Consider the following class:
class foo : public QObject {
Q_OBJECT
Q_ENUMS(E)
Q_PROPERTY(E x READ x WRITE setx)
public:
enum E {
a = 0,
b = 1,
c = 2
};
}
foo f;
f->setProperty("x", 2);
does not provide the mapped enum value to setx.
Is there a way to enable this functionality?
You still need the actual get and set methods:
This will now work: