PDA

View Full Version : textEdit Question



rogerholmes
25th May 2009, 01:08
i am trying to copy keys as user types, into a read only textedit (trying type to 2 textedits at the same time), when i type "ABCDEF" in textedit1,

the textEdit2 displays

A
B
C
D
E
F

I am using textedit2.append(keyPressed);
any idea what is wrong?
roger:o

aamer4yu
25th May 2009, 05:31
i am trying to copy keys as user types into a read only textedit
Isnt that contradictory ? if you want the text to appear in text edit, why are u making it read ony ????????

As for your ques, QTextEdit::append appends a new paragraph with text to the end of the text edit. May be the paragraph means para from new line :rolleyes:

rogerholmes
25th May 2009, 06:02
aamer4yu,

i have an app that i want the user to type in one textEdit and the keypress's to show up in a read only textedit on a separate form (much like a chat app.). i have found that append does indeed add a newline. i am still trying to find something that will work.

wysota
25th May 2009, 07:49
QTextCursor::insertText()

ashukla
25th May 2009, 09:57
i am trying to copy keys as user types, into a read only textedit (trying type to 2 textedits at the same time), when i type "ABCDEF" in textedit1,

the textEdit2 displays

A
B
C
D
E
F

I am using textedit2.append(keyPressed);
any idea what is wrong?
roger:o

Another way is via this link;
http://www.qtcentre.org/forum/f-qt-programming-2/t-vertical-orientation-of-text-11546.html