[Qt-interest] properties order in Qt designer plugins
Friedemann Kleint
Friedemann.Kleint at nokia.com
Tue Aug 11 14:50:33 CEST 2009
Hi,
> >
> > In my designer widget plugin I have some Q_PROPERTies to personalize.
> >
> > I would like to know if there is a way to define an order in which those
> > properties have to be executed.
> >
> > For esample, supposing that the widget plugin has two Q_PROPERTies:
> >
> > Q_PROPERTY(a, READ a WRITE setA,,)
> >
> > Q_PROPERTY(b, READ b WRITE setB,,)
This issue exists in Qt as well. For example, if you set checkable=true on a
QPushButton, you can set checked=true only after that call.
The declaration in qabstractbutton.h looks like:
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE
isCheckable ....)
uic will set the properties in that order and all will work well. Note how the
boolean DESIGNABLE function influences the enabling of the property in Qt
Designer.
Regards,
Friedemann
--
Friedemann Kleint
Nokia, Qt Development Frameworks
More information about the Qt-interest-old
mailing list