PyQt question (connecting signals)

Henrik Motakef henrik.motakef at web.de
Mon Apr 8 15:57:37 EDT 2002


"Janos Blazi" <jblazi at hotmail.com> writes:

> I have a very simple application. Can I connect a signal from a QPushButton
> to a normal python function without using classes at all?

Well, you will at least have to use the QPushButton class ;-)

However, try something like:

QObject.connect(myButton, SIGNAL("clicked()"), myFunction)

(This is documented, btw. See 
<http://www.riverbankcomputing.co.uk/pyqt/docs/x156.html>)

hth
Henrik



More information about the Python-list mailing list