PDA

View Full Version : how to get last character of QLineEdit



yagabey
5th January 2008, 16:30
Hello,
I am trying to make a hyperterminal like program..

I am getting the data from QLineEdit and sending it through serial port...

The way i thoght was that: i connected textChanged signal of QLineEdit to send function....

But in every key stroke, send function sends whole QlineEdit again...
i wanna get the last character of QLineEdit and just send it; but i couldn't find a way to get the last character...Any idea hoe can i do that?

Or should i use another approach for this hyperterminal like program...

input like:

hello world

gives output otherside:

h
he
hel
hell
hello
hello
hello w
hello wo
hello wor
hello worl
hello world

i want just:

hello world

jacek
5th January 2008, 16:38
Just get the rightmost character from that QString.