Function QVariant.value

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

N value(Q) (
  auto const ref Q target
) const
if (isQVariantOrQuantity!Q);

Example

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

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