[PyQt] Variable
Sebastian Roth
xsebbi at gmx.de
Mon May 6 12:36:11 EDT 2002
Hi there,
I've got an strange problem with python and PyQt.
First, here is the source of the problem-part:
class GUI(Basic,QVBox) #Basic contains some
#basic program operations
def __init__(self, master=None):
qt.QVBox.__init__(self,master)
self.text1 = qt.QLineEdit(self)
self.text1 = qt.QLineEdit(self)
add = qt.QPushButton("Add Entry",self,"add")
add.setFont(qt.QFont("Arial",14))
qt.QObject.connect(add, qt.SIGNAL("clicked()"), \
self.process)
def process(self):
ulist=[]
a= self.text1.text()
b= self.text2.text()
print a
print b
ulist.insert(0,a)
ulist.insert(1,b)
print ulist
Ok, all went fine at runtime, but I can't access the variables properly.
in process are a and b correct, but they can't be really good placed in
'ulist'!
I get the something like that:
[<qt.QString instance at 0x81f5424>, <qt.QString instance at 0x81fa464>]
But what do I'm wrong???
Could you help me, please?
Thank you in advance,
Sebastian
More information about the Python-list
mailing list