Question

i have defined a custom widget, basically adding to QLabel. The simple (Qstring and enum ) properties are ok and appear in my QT designer.

I am now trying to add a property which is a list.

So I declare my property as :

 Q_PROPERTY(QList<int> points READ getpoints )

and I have my private variable QList<int> m_points;

Still, I cannot see my points property in QT designer propriety editor. And, I don't know what went wrong.

I've tried to add the DESIGNABLE flag but it does nothing.

Any clue ?

Was it helpful?

Solution

The problem stems from the fact I forgot the WRITE part in the property.

Adding the set method and the Write in the Q_PROPERTY did the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top