Hi,
I have a piece of code like this: namespace FOO_NS { class FOO_CLASS : public QObject { Q_OBJECT public: enum FOO_EM { EM_A, EM_B }; signals: void trigger(FOO_EM foo); } } the signals doesn't work obviously as enum doesn't be registered. if I add Q_ENUM(FOO_EM) after the enum declaration, it doesn't work too. If I add Q_NAMESPACE and Q_ENUM_NS(FOO_EM) before/after the enum declaration respectively, some errors encounters like "'const QMetaObject FOO_NS::FOO_CLASS::staticMetaObject' conflicts with a previous declaration". now the only work way that I have tried is that using qRegisterMetaType<FOO_NS::FOO_CLASS::FOO_EM>() to registered it, and change "void trigger(FOO_EM foo)" to "void trigger(FOO_NS::FOO_CLASS::FOO_EM foo)", which looks a bit ugly and I want to know is there more concise way to achieve it. Thanks and best regards, Nus
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest