No--per the docs, Q_PROPERTY cannot contain commas (error is "`Q_PROPERTY` does not name a type").
Oops, sorry.
When I read the doc you quoted:
For QMap, QList, and QValueList properties,
the property value is a QVariant whose value is the entire list or map.
I understand the following:
Q_PROPERTY(QMap values READ getValues WRITE setValues
)
Q_PROPERTY(QMap values READ getValues WRITE setValues)
QVariant getValues();
void setValues(QVariant values);
To copy to clipboard, switch view to plain text mode
And I guess you go something like:
QMap<GtVariant,int> values = pObject->getValues().value<QMap<GtVariant,int> >();
QMap<GtVariant,int> values = pObject->getValues().value<QMap<GtVariant,int> >();
To copy to clipboard, switch view to plain text mode
When you want to use it.
See docs about QVariant and userTypes.
Bookmarks