QVariant var(123); qulonglong val = var.toULongLong(); // val is 123ULL
QVariant var("456"); qulonglong val = var.toULongLong(); // val is 456ULLIn this example, a QVariant object is created with a string value of "456". The toULongLong method is called on the QVariant object, and the returned value is stored in a variable called val. The method converts the string to an unsigned long long integer. The Qt library is the package library for QVariant.