Hi,
My class is not derived from QObject, how can I still use Q_PROPERTY macro? I did the following:
Qt Code:
class MyClass { Q_GADGET Q_PROPERTY( ...... ) };To copy to clipboard, switch view to plain text mode
The moc system recognizes Q_GADGET tag and generates staticMetaObject, as well as those property names registered with Q_PROPERTY, but I can't use the QMetaProperty::read method to read the property value, as it expects QObject. Is there a way to work around (without sub-class from QObject)?
Thanks!
Bookmarks