Qt-interest Archive, April 2008
Property's USER attribute, what for?
Message 1 in thread
Hi all,
Q_PROPERTY( type propname READ readFun WRITE writeFun .... USER)
What's Q_PROPERTY's 'USER' attribute for? Can
someone point me to a usage example of it? The
docs only stated:
"specifies that a particular property in a class (typically
a widget) contains user-facing information, and is
the main property that a user will modify via the GUI
when using instances of the class in an application."
...and how do we make property changes (both through
QObject::setProperty() and the WRITE function) fires
automatically a signal?.
Thanks.
--
[ signature omitted ]
Message 2 in thread
It is explained in the docs for QItemEditorCreatorBase. Find it in your
assistant, or here: http://doc.trolltech.com/4.3/qitemeditorcreatorbase.html
Bo.
On fredag den 4. April 2008, Barkah Yusuf Widodo wrote:
> Hi all,
>
> Q_PROPERTY( type propname READ readFun WRITE writeFun .... USER)
>
> What's Q_PROPERTY's 'USER' attribute for? Can
> someone point me to a usage example of it? The
> docs only stated:
>
> "specifies that a particular property in a class (typically
> a widget) contains user-facing information, and is
> the main property that a user will modify via the GUI
> when using instances of the class in an application."
>
> ...and how do we make property changes (both through
> QObject::setProperty() and the WRITE function) fires
> automatically a signal?.
>
> Thanks.
--
[ signature omitted ]
Message 3 in thread
Hi,
Barkah Yusuf Widodo wrote:
> Q_PROPERTY( type propname READ readFun WRITE writeFun .... USER)
>
> What's Q_PROPERTY's 'USER' attribute for? Can
> someone point me to a usage example of it? The
> docs only stated:
>
> "specifies that a particular property in a class (typically
> a widget) contains user-facing information, and is
> the main property that a user will modify via the GUI
> when using instances of the class in an application."
Have you seen this:
http://doc.trolltech.com/4.3/qdatawidgetmapper.html
> ...and how do we make property changes (both through
> QObject::setProperty() and the WRITE function) fires
> automatically a signal?.
Make them dynamic properties; you won't get a signal, but you do get an
event:
http://doc.trolltech.com/4.3/qdynamicpropertychangeevent.html
Tim
----------------------------------------------------------------------
dr. t. dewhirst [t] +44 (0)1738 450 465
director [w] www.bugless.co.uk
bugless software development ltd.
[a] algo business centre, glenearn road, perth, PH2 0NJ
--
[ signature omitted ]