Eron Lloyd wrote:
Would there be any benefit in doing this? From the way I understand it, all Qt objects already expose their get/set methods, while any objects you create through subclassing can simply use Python's native properties support. For the most part, properties have their biggest value in use with Designer.

well, mostly syntactic sugar.
But I realize that qt often names the getter method the same way as the property itself, which generates a naming conflict if you want to expose
both in python.


So the suggestion would have to be to *only* expose the property (and
escape the getter method name):

class QWidget(object):

    def getCaption(self):
         #...

    def _caption(self): #escape with '_'
         #...

caption = property(_caption, getCaption)




But as that would not be backward compatible I guess it's not an option...

Regards,
                Stefan

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to