Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Hugo Parente Lima
On Friday 13 August 2010 11:46:55 Lauro Moura wrote: > On Fri, Aug 13, 2010 at 11:08 AM, Marcelo Lira > > wrote: > > I hate all of you guys. :) > > (Lauro, -0.5!?) > > But I'm convinced, no dynamic Qt properties using the constructor. > : > :) > > +1 - I'm ok with it. > +0.5 - Seems good, but co

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Lauro Moura
On Fri, Aug 13, 2010 at 11:08 AM, Marcelo Lira wrote: > I hate all of you guys. :) > (Lauro, -0.5!?) > But I'm convinced, no dynamic Qt properties using the constructor. > :) +1 - I'm ok with it. +0.5 - Seems good, but could be/must be improved. 0 - Undecided -0.5 - Somewhat against, but the pro

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Marcelo Lira
I hate all of you guys. :) (Lauro, -0.5!?) But I'm convinced, no dynamic Qt properties using the constructor. On 13 August 2010 08:37, Lauro Moura wrote: > On Fri, Aug 13, 2010 at 5:01 AM, Mark Summerfield wrote: >> On Thu, 12 Aug 2010 17:37:12 -0300 >> Marcelo Lira wrote: >>> According to PSEP

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Lauro Moura
On Fri, Aug 13, 2010 at 5:01 AM, Mark Summerfield wrote: > On Thu, 12 Aug 2010 17:37:12 -0300 > Marcelo Lira wrote: >> According to PSEP 101[1] a constructor for QObject and derived classes >> should be able to set Qt properties through named arguments. >> In practical terms to set the Qt propert

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Mark Summerfield
On Thu, 12 Aug 2010 17:37:12 -0300 Marcelo Lira wrote: > According to PSEP 101[1] a constructor for QObject and derived classes > should be able to set Qt properties through named arguments. > In practical terms to set the Qt property "objectName" to "foobar" one > should do: > > obj = QObject(ob

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-13 Thread Matti Airas
On 12.08.2010 23:37, ext Marcelo Lira wrote: Now, the point of this email is to change PSEP 101 to allow the QObject (and derived types) constructor to accept setting dynamic Qt properties. PyQt and the current PSEP 101 only provide this for already existing Qt properties, while QObject.setPrope

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-12 Thread Renato Araujo Oliveira Filho
In my option the correct behavior is not support dynamic properties on constructors, because this can cause a lot of mistakes, and the programmer can generate bugs without knowing. with QObject.serProperty at least you have the return value to verify if you do this wrong, If support dynamic propert

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-12 Thread Carlos Gonçalves
My humble opinion still stands nevertheless ;-) Carlos Gonçalves On 2010/08/12, at 22:12, Marcelo Lira wrote: > Oh, no, I'm a bad communicator! > I was supporting to allow setting dynamic Qt properties. > The "no special cases" I referred to was not treat differently > existing and dynamic Qt pr

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-12 Thread Marcelo Lira
Oh, no, I'm a bad communicator! I was supporting to allow setting dynamic Qt properties. The "no special cases" I referred to was not treat differently existing and dynamic Qt properties, and having to explain to the developer to avoid using the dynamics because we don't trust him (the developer, n

Re: [PySide] Setting dynamic Qt properties on constructor

2010-08-12 Thread Carlos Gonçalves
Hi, On 2010/08/12, at 21:37, Marcelo Lira wrote: > We had a short discussion on #pyside IRC channel and one point of > prohibiting the setting of dynamic properties using the constructor > would allow the programmer to make mistakes without knowing. Mistakes > such as > > obj = QObject(objectnam

[PySide] Setting dynamic Qt properties on constructor

2010-08-12 Thread Marcelo Lira
According to PSEP 101[1] a constructor for QObject and derived classes should be able to set Qt properties through named arguments. In practical terms to set the Qt property "objectName" to "foobar" one should do: obj = QObject(objectName='foobar') This can be done in a more verbose way: obj = Q