strange QLineEdit problem in PyQt

T

taco

hi,
I have a form containing a few QLineedits and I wish to retrieve the
contents only after pressing a QPushButton.
a looks like:
class Contract(QtGui.QWidget):
def __init__(self,fileInfo, parent=None):
QtGui.QWidget.__init__(self,parent)
self.name = QtGui.QLineEdit("")
.....
self.createDoc = QtGui.QPushButton("do it")
self.connect(createDoc,QtCore.SIGNAL("clicked()"),self.Foo)
mainLayout.addWidget(self.name)
mainLayout.addWidget(sef.createDoc)

def Foo(self):
print self.name.text()

when executing this I get only a few characters back from the line. It's
incomplete. How to retrieve the complete string? I don't need a signal for
every typed character.

taco
 
T

taco

taco wrote:

ah, I solved it myself. for completeness reasons. I had upgraded python for
reportlab which needed this python version, while still using a pyqt which
was compiled for 2.6. After compilation and changing pythonpath to the right
site-packages dir it's working
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top