[Qt-interest] Getting enum names as String for Qt:: identifyer

Justus Best just18 at gmx.de
Tue Jun 15 13:31:35 CEST 2010


Hi,

Is there a possibility to get the names of enums declared in <QtCore/Qt> ?

I found out that I can get enum names for a MetaObject, but I guess 
there is no MetaObject generated with enums in the Qt Namespace.
Would have liked it to display meaningful descriptions for QBrushes 
without using a long switch case to return a string representation.

E.g. nameOfBrush(QBrush b) returning "SolidPattern" if b's style is 
Qt::SolidPattern.





More information about the Qt-interest-old mailing list