Reputation: 739
I have this property:
Q_PROPERTY(int _a READ a WRITE setA NOTIFY aChanged)
I know only the property's name _a
. I would like get the index of the method setA
.
Upvotes: 1
Views: 364
Reputation: 9166
Check out QMetaObject::indexOfProperty(const char * name)
and QMetaProperty QMetaObject::property(int index)
. They will allow you to access the property by name.
AFAIK there is now way to access a setter method via the corresponding property.
Upvotes: 1