[Development] About Q_PROPERTY in custom widget plugin for designer
Olivier Goffart
olivier at woboq.com
Fri Feb 7 22:32:43 CET 2014
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
More information about the Development
mailing list