strange QLineEdit problem in PyQt
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
--
http://mail.python.org/mailman/listinfo/python-list
Re: strange QLineEdit problem in PyQt
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
> 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
--
http://mail.python.org/mailman/listinfo/python-list
Re: lock access to serial port
[EMAIL PROTECTED] wrote: > hello group, > > how to get ttyS0 serial port for exclusive access? I have a python > script that uses this device with AT commands. I need that two > instances can call simultaneosuly this python script but only one of > them gets the device. I tried fcntl.flock, it was just ignored, put > writtable file LCK..ttyS0 in /var/lock, tried ioctl (but I may not > know what are appropriate arguments), googled half a day for various > phrases, error messages etcwithout success. > > please help, > > Andra not sure if I understand you well, but how about a server application which accepts 2 clients which can send messages which are output on the serial device? The serial device access protected with a mutex while receiving messages done in 2 threads or something. taco -- http://mail.python.org/mailman/listinfo/python-list
