C++ (Qt)class A : public QObject{ Q_OBJECT ... enum eType{ Type1, Type2 }; ...};class C: public QObject{ Q_OBJECT Q_ENUMS( A::eType ) void Test() { const QMetaObject *pm = metaObject(); QList<QString> lNamesEnums; QList< QList<QString> > lEnumsNames; for( int i=0, n=pm->enumeratorCount(); i<n; i++ ) { QMetaEnum m = pm->enumerator(i); lNamesEnums += m.name(); QList<QString> keys; for( int i=0,n=m.keyCount(); i<n; i++ ) keys += m.key(i); lEnumsNames += keys; } }};
C++ (Qt)public: enum eType{ Type1, Type2 };
class RAILCORESHARED_EXPORT QRailItem : public QGraphicsObject, public CXMLSerializationInterface{ Q_OBJECTprivate: Q_FLAGS(Qt::Alignment) Q_PROPERTY(Qt::Alignment title_flags READ textFlags WRITE setTextFlags DESIGNABLE true RESET reset_title_flags)};
C++ (Qt)class ItemStorage{ Q_GADGET Q_ENUMS(ItemStorageEnum) public: enum ItemStorageEnum { NotInStorage = 0, Inventory, Cube = 4, Stash, PersonalStash, SharedStash, HCStash }; static QMetaEnum metaEnum() { return metaEnumFromName<ItemStorage>("ItemStorageEnum"); }};