[PyQt] how to get all the signal from a QObject/QWidget ? and other Q about signals

Emmanuel Mayssat emayssat at gmail.com
Thu Feb 16 23:19:18 GMT 2012


I have a widget inside another widget.

1/
I would like to have a ~for loop that propagate all the signals of the
inner widget as if they were emitted by the container widget.
That is for each signals
self.connect(myChild, SIGNAL("mySignal()"), self.mySignal.emit())

how can I list the signals that an object has?

2/
I understand also that the signals needs to be declared at both levels.
Is there a way to do that progammatically?

3/
A propos, I noticed that inheritance doesn't seem to pass signal definition.
That is

class Lwidget(QWidget):
    mysignal = pyqtSignal()

class LSuperWidget(Lwidget):
    <here the signal needs to be redefined>        <-- is there a way to
avoid this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120216/f30bad19/attachment.html>


More information about the PyQt mailing list