[Qt-interest] Constructing a QEnum with only a metatypeid.

MARTIN Pierre hickscorp at gmail.com
Fri Aug 12 09:12:48 CEST 2011


> Seems to me the same problem that I had.
> I solved it with a workaround using v.typeName() and searching the typename in a const QList with list.indexOf().
i don't understand your point… You solved what with that workaround? i don't think that would be of any help to my question.

> Maybe it's possible to subclass QVariant and add a setCustomType(int) function?
Doesn't feel right to me. i would rather want to see MOC generating more informations about enums to be able to integrate them to QVariant at compile time than having to convert each Qt returning QVariant to the subclass and so on.

Thanks for the idea tho.
Pierre.





More information about the Qt-interest-old mailing list