[Development] About Q_PROPERTY in custom widget plugin for designer

Svetkin Mikhail mikhail.svetkin at gmail.com
Mon Feb 10 05:49:57 CET 2014


I allow expression without range limit for example:
ui->label().foo()
or
ui.foo().test()->boo()
and etc.

and I added my patch and added you as a reviewer (
https://codereview.qt-project.org/#change,77758).


2014-02-08 3:32 GMT+06:00 Olivier Goffart <olivier at woboq.com>:

> On Friday 07 February 2014 14:05:09 Svetkin Mikhail wrote:
> > Hellow all.
> > I was creating custom widgets with the help of Qt-designer model.
> > And I have noticed I have to duplicate my code, if I want to edit
> > properties of the widget in qt-designer property editor.
> >
> [...]
> >       Q_PROPERTY(QString label READ ui->CustomWidgetFirst->label
> >                                WRITE ui->CustomWidget->label)
> >
> > If this solution is adopted, then I have a working MOC and I can submit
> to
> > gerrit.
>
> Hi,
>
> Not a bad idea. I myself would have loved to use that before.
> Please add your patch on gerrit and add me as a reviewer.
>
> But how complicated would you allow the expression?
>
> Also you can write your helper functions inline which make the code
> duplication less important.
>
> --
> Olivier
>
> Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140210/f84c0897/attachment.html>


More information about the Development mailing list