def print_attrs(o):
for i in o.__dict__.keys():
print i
print_attrs(QApplication([]))
On 5/31/06, Phil Thompson <[EMAIL PROTECTED]> wrote:
On Thursday 01 June 2006 12:38 am, Rightful King wrote:
> 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
setMainWidget() is PyQt3. There is no equivalent in PyQt4.
> When I comment out that line, I get the same message about exec_loop.
> What's up?
exec_loop() is PyQt3. The PyQt4 equivalent is exec_().
Phil
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde