[PyKDE] AttributeError in PyQt on WinXP
Rightful King
rightful.king at gmail.com
Thu Jun 1 00:38:01 BST 2006
Hey all,
Here is the code:
import sys
from Qt import *
a = QApplication([])
# Our function to call when the button is clicked
def sayHello():
print "Hello, World!"
# Instantiate the button
hellobutton = QPushButton("Say 'Hello world!'",None)
# And connect the action "sayHello" to the event "button has been clicked"
a.connect(hellobutton, SIGNAL("clicked()"), sayHello)
# The rest is known already...
a.set_main_widget(hellobutton)
hellobutton.show()
a.exec_loop()
I get the following message: AttributeError: set_main_widget
When I comment out that line, I get the same message about exec_loop. What's
up?
Thanks,
Doug Woos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060601/0cf57f2b/attachment.html
More information about the PyQt
mailing list