[Interest] Using another Class's enum in your class

Jason H scorp1us at yahoo.com
Wed Feb 12 15:38:24 CET 2014

The Q_ENUMS() macro will do what I want -- for QObject derived class enums. But what does one do about an enum that is not QObject derived?

Q_PROPERTY(int/*QImage::Format*/ imageFormat READ imageFormat WRITE setImageFormat); //works
Q_PROPERTY(QImage::Format imageFormat READ imageFormat WRITE setImageFormat) //causes bad moc code
---bad code-------- 
static const QMetaObject*qt_meta_extradata_VideoSurface[]={
&QImage::staticMetaObject, // "staticmetaObject is not a member of QImage"

For now I'm just using an int. What should I be doing?

More information about the Interest mailing list