[PyQt] Flexible __init__ and method chaining.
Phil Thompson
phil at riverbankcomputing.com
Tue Dec 8 22:11:10 GMT 2009
On Tue, 08 Dec 2009 20:32:35 +0200, ukpyr666 <ukpyr666 at gmail.com> wrote:
> Direct translation of C++ API results in huge initialization code
> where it can be done with 1 line.
> To decrease initialization code it will be useful if __init__ of PyQt4
> classes can take additional parameters from **kwargs and auto call
> setXXX methods to set them.
That was added in PyQt v4.6.
> Also setXXX can return self for method chaining.
Use the QObject.pyqtConfigure() method added in PyQt v4.6.
Phil
More information about the PyQt
mailing list