I have the following class, where I try to obtain some metadata of an enum MyEnum
. However, when looping over meta.enumeratorCount()
its count is alway
You need to register the enum with the metadata system using the Q_ENUMS() macro:
class FsxSimConnectQtfier : public QObject
{
Q_OBJECT
Q_ENUMS(MyEnum) // <---
public:
explicit FsxSimConnectQtfier(QObject *parent = 0);
enum MyEnum { G1, G2 };
static const QString simConnectExceptionToString(const unsigned int id);
};