[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] AttributeError in PyQt on WinXP
From:       "Rightful King" <rightful.king () gmail ! com>
Date:       2006-05-31 23:38:01
Message-ID: 3d27cc750605311638j29939214j6e6973ebbf434061 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Hey all,<br><br>Here is the code:<br><br>import sys<br>from Qt import *<br><br>a = \
QApplication([])<br><br># Our function to call when the button is clicked<br>def \
sayHello():<br>&nbsp;&nbsp;&nbsp; print &quot;Hello, World!&quot;<br><br> # \
Instantiate the button<br>hellobutton = QPushButton(&quot;Say 'Hello \
world!'&quot;,None)<br><br># And connect the action &quot;sayHello&quot; to the event \
&quot;button has been clicked&quot;<br>a.connect(hellobutton, \
SIGNAL(&quot;clicked()&quot;), sayHello) <br><br># The rest is known \
already...<br>a.set_main_widget(hellobutton)<br>hellobutton.show()<br>a.exec_loop()<br><br><br>I \
get the following message: AttributeError: set_main_widget<br><br>When I comment out \
that line, I get the same message about exec_loop. What's up? \
<br><br>Thanks,<br><br>Doug Woos<br>



_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic