Struct QVariant

A dimensionnaly variant quantity.

struct QVariant(N) ;

Constructors

NameDescription
this Creates a new quantity from another one with the same dimensions
this Creates a new dimensionless quantity from a number

Properties

NameTypeDescription
baseUnit[get] QVariantReturns the base unit of this quantity.
dimensions[get] DimensionsReturns the dimensions of the quantity
isDimensionless[get] boolTest whether this quantity is dimensionless

Methods

NameDescription
get Implicitly convert a dimensionless value to the value type.
isConsistentWith Tests wheter this quantity has the same dimensions as another one.
opAssign Operator overloading
opBinary Operator overloading
opBinaryRight Operator overloading
opCast Cast a dimensionless quantity to a numeric type.
opCmp Operator overloading
opEquals Operator overloading
opOpAssign Operator overloading
opUnary Operator overloading
value Gets the value of this quantity when expressed in the given target unit.

Parameters

NameDescription
N the numeric type of the quantity.

See Also

QVariant has the same public members and overloaded operators as Quantity.