Jojo-Schmitz wrote
>>From: Joachim Schmitz [mailto:

> jojo@

> ] 
>>>From: Maurizio M. Gavioli [mailto:

> miwarre@

> ]
>>
>>https://qt-project.org/doc/qt-5/qobject.html#Q_ENUMS:
>>In addition, the class defining the enum has to inherit QObject as well as
> declare the enum using Q_ENUMS().
> 
> Here's where the problem starts, I think. How to inherit QObject from
> outside a class? How to use Q_ENUMS() outside a class?

Neither can be done: only a class can inherit QObject and Q_ENUMS() is only
valid within a class.

An attempt of simulating an out-of-class enum for QML can be seen at:
http://qt-project.org/forums/viewthread/18529

I think it is better to avoid dirty tricks of this kind and pull back those
enums into some class; several enums have an obvious class candidate; the
Element class could be used for the other.

Maybe, the enum themselves could be turned into full-fledged classes, but
this probably raises other concerns.

Maurizio



--
View this message in context: 
http://dev-list.musescore.org/Enum-s-and-plug-ins-tp7578860p7578863.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to