hi all,
i have a qproperty enum
enum EditType {Currency, Percent, LabeledNumber, Text};
that i need for a custom widget plugin. in the properties examples in the docs it defines the enum within the body of the class. my enum is used by a number of classes so it needs to be defined in a header file outside the class and included so all classes can see it.
the docs state that the enum must be "declared in the class itself". i do this as it states with the Q_ENUMS(EditType) macro (unless it's talking about the above enum statement). then i implement the other qproperty statements so i have:
Code:
// a header file enum EditType {Currency, Percent, LabeledNumber, Text}; //plugin widget file Q_ENUMS(EditType) Q_PROPERTY(EditType LineType READ GetLineType WRITE SetLineType DESIGNABLE true); public: EditType GetLineType() const {return LineType;} protected: EditType LineType; public slots: void SetLineType (const EditType);
everything compiles and links fine, but the problem is that while LineType shows up in the properties in designer, it's blank and and there's no way to change it.
anyone know what's wrong and how to fix it?
thanks!
lou