protobuf-qt icon indicating copy to clipboard operation
protobuf-qt copied to clipboard

Enum QML Registration

Open xaqq opened this issue 5 years ago • 0 comments

Hello and thank you for this project,

I am using this project against Qt 5.12. When calling qmlRegisterType<MyEnumWrapper>("my.namesapce", 1, 0, "MyEnum"); QQmlPrivate::QQmlElement<T> (with T=MyEnumWrapper) complains that its destructor does not override. This is because MyEnumWrapper is not a QObject.

My current solution is to make MyEnumWrapper inherits from QObject, however I'm wondering if there is another way to register the enum to Qml that would avoid the issue altogether.

xaqq avatar Feb 02 '19 15:02 xaqq