View Full Version : From Qvariant to int (16) and long (32) and vice-versa
tonnot
13th May 2011, 10:38
I have some confused with type conversion using QVariant.
Qvariant.toInt gives me an int (16 ).
I need QVariant.tolong (32 )
and QVariant (int)
and QVariant (long)
I dont find a method....
Thanks.
wysota
13th May 2011, 11:30
What system are you running on?
tonnot
13th May 2011, 13:44
Win xp
I want to have a Qvariant for the standar int, long (to store and to return data)
Now I have some mess with the int, qint, qint16, etc.
Qvariant has not long ? And the int returned is a STD int or STD long ?
Thanks
wysota
13th May 2011, 13:46
Win xp
On Win XP both int and long are 32 bit thus you can use toInt() in both cases.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.