[Qt-interest] QVariant and user defined types
Justus Best
Just18 at gmx.de
Tue Jun 1 13:52:07 CEST 2010
Hi,
I currenty stuck a little while trying to add some of my classes to
QVariant.
My problem is that I can't find a way to put my Types in an enum and use
them in a switch case with QVariant::userType().
I tried with an enum like :
enum MyTypes { Type1 = QVariant::UserType, Type2, Type3, Type4, Type5 };
But this doesn't correspond with the TypeIds I get if I call
QVariant::userType().
So is there any possibility to use QVariant with user definded types in
a switch statment ?
Kind regards Justus
More information about the Qt-interest-old
mailing list