[PyQt] Is the result of SIGNAL() a constant?
Phil Thompson
phil at riverbankcomputing.co.uk
Thu Jan 10 09:41:22 GMT 2008
On Wednesday 09 January 2008, nytmyn wrote:
> I've played with signals and slots in PyQt about 2 month ago and came to
> this:
> - Qt signals added to Qt classes with names as in qt, implemented using
> __get__ protocol,
> so calls like connect(w.signal, w.slot) are possible
> - overloaded signals - there are not many of them - e.g: clicked() and
> clicked(bool)
> are named the same way as in QtJambi - clicked() --> clicked, clicked(bool)
> --> clickedBool
> - class Signal used for declaring signals in Python
> But it's nothing more then a quick prototype :)
> Source code should be here: http://www.nabble.com/file/p14723864/QtUtil.py
> QtUtil.py
> Jakub
This works Ok for Qt because Qt is a well designed API. It wouldn't work for a
badly designed API (with foo(QString *) and foo(const QString &)).
That said, this whole thing would be in addition to the current
implementation - it would not be a replacement - so maybe it doesn't need to
provide a solution to the "difficult" cases.
Phil
More information about the PyQt
mailing list