[PyKDE] Emitting a signal from Python
Tony Cappellini
cappy2112 at gmail.com
Sun Feb 4 06:45:57 GMT 2007
I've tried to add a line of code to emit a signal.
The sender is normally a combo box, the receiver is a Text Edit box.
The connect statement (that works) looks like this
self.connect(self.Names, QtCore.SIGNAL("activated(const QString &)"),
self.updateNameBrowser)
I want to 'simulate' the user selecting an item in the combo box,
however I can't quite get the Python syntax correct.
I want to use this a.emit(QtCore.SIGNAL("clicked()"))
taken from here
http://www.riverbankcomputing.com/Docs/PyQt4/pyqt4ref.html#emitting-signals
but I don't know what object to subsitute 'a' for
When I try using the combo box
self.Names.emit(QtCore.SIGNAL("activated()"))
the desired result doesn't occur. That is, the TextEdit never receives
the signal.
More information about the PyQt
mailing list