On Thu, Sep 10, 2009 at 8:42 AM, Phil Thompson <[email protected]> wrote: > On Thu, 10 Sep 2009 01:25:12 +0300, "Ville M. Vainio" <[email protected]> > wrote: >> [..] >> Now, can we have something that does the same thing outside constructor? >> E.g. >> >> act = menu.addAction('blah') >> act.configure(triggered=self.save, statusTip="Save the document") > > Possibly, but it will need a prefix to avoid potential name clashes. I was thinking about the same when I read the announcement. The use of keyword arguments looks like a great idea and could simplify code and even make it faster (less method calls/name lookups from Python).
As far as I remember configure is used in Tkinter. Currently it is not used by Qt but I guess using set_properties or something like it would be safer. A underscore method name does not follow the Qt style guide but it follows PEP8 - so it would be clear that this Python-specific. Henning _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
