On Sun, 22 Apr 2012 08:54:44 +0100, Andrew Suffield
<asuffi...@suffields.me.uk> wrote:
> I'd rather like to be able to write code like this:
> 
> for name in dir(obj):
>   a = getattr(obj, name)
>   if isinstance(a, QtCore.pyqtSignal):
>     setattr(self, name, a)
> 
> Unfortunately, signals of objects are of class pyqtBoundSignal and I
> can't find a class object to pass to isinstance - does it exist?

No, easy to add.

> For similar purposes of metaclass hackery, it would be useful to get
> the string form out of a signal object so that I can call functions
> like QObject.connectNotify and QObject.receivers

So a __signal__ attribute to pyqtBoundSignal?

Should the value of the attribute already have the SIGNAL() macro applied
to it?

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to