#include#include int main() { QVariant var(12345); qInfo() << var.toLongLong(); return 0; }
#includeIn this example, the QVariant object is created with a string value of "987654321" and then converted to a long long integer using the toLongLong function. The output of this program will be 987654321. Package Library: Qtcore library.#include int main() { QVariant var("987654321"); qInfo() << var.toLongLong(); return 0; }