[Qt-interest] QVariant problem

Patrik Nylund patrik.nylund at tke.fi
Fri Jan 8 08:24:00 CET 2010


Hi

I have a problem with QVariant, the following doesn't work...

bool bad;
quint32 myUInt32;
QVariant *myVariant;
QString myString = "0x12ae45";

myVariant = new QVariant(myString);
myUInt32 = myVariant->toUInt(&bad);                  // Shouldn't this 
work? I get bad = false and myInt32 = 0


thanks

br, Patrik



More information about the Qt-interest-old mailing list