QVariant

qtdatastream/types. QVariant

new QVariant(obj)

Source:
Parameters:
Name Type Description
obj *

Extends

Methods

(static) coerceNumbersTo(type)

Source:

By default, numbers are coerced to QUInt (unsigned 32bit ints). This method allows to change this default behavior to coerce numbers to any other QClass by default

Example
const { QVariant, Types } = require('qtdatastream').types;
QVariant.coerceNumbersTo(Types.DOUBLE);
Parameters:
Name Type Description
type Types

(static) read(buffer) → {*}

Source:
Parameters:
Name Type Description
buffer Buffer
Returns:

Buffer coerced to underlying QVariant type

Type
*

(inner) toBuffer() → {Buffer}

Source:
Returns:
Type
Buffer