[PyKDE] Confused on connects.

Hihn, Jason Jason.Hihn at verint.com
Tue Sep 21 16:42:56 BST 2004


I have a simple python script that is below. How can I connect the
Canceled function to the buttonCanceled button that is created in the UI
file?



Thanks in advance!



#!/usr/bin/python
from qt import *
from qtui import *
import sys,string


def 'Canceled' ():
    print 'Canceled'

a=QApplication(sys.argv)
w=QWidgetFactory.create('network.ui')
a.connect(a, SIGNAL("lastWindowClosed()"), a, SLOT("quit()"))
Cancel=w.child('buttonCancel')


# HOW DO I CONNECT THIS TO THE Canceled() ABOVE?
a.connect(Cancel, SIGNAL("clicked()"), a, SLOT('Canceled()')) # does not
work

w.show()
a.exec_loop()





__________________________________________________________________________________________
This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message.  If you have received this electronic message in error, please notify us by replying to this e-mail. (2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20040921/8da84257/attachment.html


More information about the PyQt mailing list