Re: [Development] About ALIAS in Q_PROPERTY

2014-03-18 Thread Mikhail Svetkin
> > I'm also not sure if it's worth it. Perhaps using Q_PRIVATE_PROPERTY gets > us > close enough? Q_PRIVATE_PROPERTY allows only pointer and can't use ui->object->nextObject or ui_->getObject(). 2014-03-12 18:36 GMT+06:00 Simon Hausmann : > On Wednesday 12. March 2014 12.48.20 Olivier Goffar

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-12 Thread Svetkin Mikhail
> > I think the syntax is not so nice especially the need to have both > the class name and the 'path' to the property. About syntax, I think i can make syntax easier. For example: Q_PROPERTY(QString label ALIAS ui->customWidget->label) or: Q_PROPERTY(QString label ALIAS ui->customWidget label)

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-12 Thread Simon Hausmann
On Wednesday 12. March 2014 12.48.20 Olivier Goffart wrote: > On Monday 10 March 2014 17:43:35 Giuseppe D'Angelo wrote: > > Can you please explain what this feature is about, why do you think > > it's useful, how it's supposed to be used, etc.? > > > > On 10 March 2014 17:30, mikhail.svet...@gmail

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-12 Thread Konstantin Ritt
Since moc is unable to do safety checks for such complex expressions (in this case, `if (ui && ui->customWidget)`), this makes Q_PROPERTY potentially unsafe and the idea has no any value to me. Simply do s/ui->customWidget/parent()->customWidget/g and imagine what could happen there... P.S. @Olivi

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-12 Thread Olivier Goffart
On Monday 10 March 2014 17:43:35 Giuseppe D'Angelo wrote: > Can you please explain what this feature is about, why do you think > it's useful, how it's supposed to be used, etc.? > > On 10 March 2014 17:30, mikhail.svet...@gmail.com > > wrote: > > Hello, I would like to clarify wherein the compl

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-11 Thread Svetkin Mikhail
If you have 10 properties, you only need to call initAliasNotify to connect all. 2014-03-11 14:59 GMT+06:00 André Somers : > Svetkin Mikhail schreef op 11-3-2014 04:12: > > Explain: > I was creating custom widgets with the help of Qt-designer. > And I have noticed I have to duplicate my code,

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-11 Thread André Somers
Svetkin Mikhail schreef op 11-3-2014 04:12: Explain: I was creating custom widgets with the help of Qt-designer. And I have noticed I have to duplicate my code, if I want to edit properties of the widget in qt-designer property editor. Simple Example: I'm not a fan. You end up with a QProperty

Re: [Development] About ALIAS in Q_PROPERTY

2014-03-10 Thread Giuseppe D'Angelo
Can you please explain what this feature is about, why do you think it's useful, how it's supposed to be used, etc.? On 10 March 2014 17:30, mikhail.svet...@gmail.com wrote: > Hello, I would like to clarify wherein the complexity > (https://codereview.qt-project.org/#change,80412)? > Ready to lis

[Development] About ALIAS in Q_PROPERTY

2014-03-10 Thread mikhail.svet...@gmail.com
Hello, I would like to clarify wherein the complexity (https://codereview.qt-project.org/#change,80412)? Ready to listen to any suggestions and implement them. -- Mikhail Svetkin ___ Development mailing list Development@qt-project.org http://lists.qt-p