QVariant.value

Gets the value of this quantity when expressed in the given target unit.

struct QVariant(N)
const
N
value
(
Q
)
(
auto ref const Q target
)

Examples

auto minute = unit!int("T");
auto hour = 60 * minute;

QVariant!int time = 120 * minute;
assert(time.value(hour) == 2);
assert(time.value(minute) == 120);

Meta