Qt-embedded-interest Archive, March 2007
QTextEdit data not appending
Message 1 in thread
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
hi all,<br>
<br>
I have build a GUI using qt-embedded, which is <b>writing</b> and then
<b>reading</b> from serial port. So i wana display the read data on to
screen. Here i am using QTextEdit in loging mode. I wana append the
data in QTextEdit area.(i.e.All previous data should be there). But the
problem is that it is not appending, it replaces previous line with the
current line. I have tried insert() also. Please anybody suggest me,if
any thing wrong with following code or else? <br>
<br>
QTextEdit *log=new QTextEdit(bgrp2,0);<br>
log->setTextFormat( Qt::LogText );<br>
log->setGeometry(5,113,198,70);<br>
log->append(qstring); // qstring , reading from
serial port<br>
log->show(); <br>
<br>
<br>
Thank you.<br>
<br>
Warm Regards,<br>
Sandeep Kumar<br>
<br>
<br>
</body>
</html>
To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx
Message 2 in thread
Hi,
> QTextEdit *log=new QTextEdit(bgrp2,0);
> log->setTextFormat( Qt::LogText );
> log->setGeometry(5,113,198,70);
> log->append(qstring); // qstring , reading from
> serial port
> log->show();
I don't understand. Above a QTextEdit is created and qstring is appended
to it. I see no "previous line" or "current line".
--
[ signature omitted ]