[Qt-interest] QVariant::type() usage for custom QVariant types
Eckhard Jokisch
e.jokisch at orange-moon.de
Thu Jul 28 16:21:35 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks for the relply.
I already tried that one - but how do I define the number that
userType() shall return? there is not something like
variant.setUserType(int type,QString typeName)?
I need to know at compiletime what number will be returned - otherwise
I can't use "switch".
On 07/28/11 15:38, Thiago Macieira wrote:
> Answering the subject: QVariant::userType()
>
> On Thursday, 28 de July de 2011 14:19:55 Eckhard Jokisch wrote:
>> How can I use int i = v.type(); and get a unique and reliable (in
>> terms of usable in a switch/case) typenumber for my various
>> classes?
>
> You don't. You have to use userType().
>
>
>
>
> _______________________________________________ Qt-interest mailing
> list Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk4xcG8ACgkQDmkomQAAlrbh8QCgpruHVJVj0iDEmWcpxkcJnawQ
oGkAoJa/wu7GoAj5J5lB4bKC5kZcdd8c
=o4r3
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list