About the slot declaration decorator in PyQt4

Bighead Xue.Huichao at gmail.com
Mon Jul 14 21:03:40 EDT 2008


On Jul 15, 2:04 am, "Sebastian \"lunar\" Wiesner"
<basti.wies... at gmx.net> wrote:
> Bighead <Xue.Huic... at gmail.com>:
>
> > I remember when I did UI Design in PyQt4 for the first time, I found a
> > manual. In it, no "connect" was used. Instead, an OO approach is
> > applied, new UI classes inherit from old ones, and all the slot
> > functions are automatically connected to some signals, using a
> > decorator. In the __init__ function of our newly written class,
> > "connect" is not invoked.
>
> > I like this style...
>
> > Unfortunately, I cannot find that manual now.... So anyone have read
> > something like that before? If so, could you tell me where can I find
> > that manual please? Thank you :)
>
> I guess, you're referring to QtCore.pyqtSignature and
> QtCore.QMetaObject.connectSlotsByName.
>
> Seehttp://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#t...
>
> Especially "3.7.3   Connecting Slots By Name"
>
> Hih
>
> --
> Freedom is always the freedom of dissenters.
>                                       (Rosa Luxemburg)

Oh yes, that's it! connectSlotsByName. That is the reason I though Qt
was easy to use.

This will be much easier :) Thank you very much.



More information about the Python-list mailing list