Qt4-preview-feedback Archive, February 2008
QPlainTextEdit auto scrolling
Message 1 in thread
Hi,
It seems that QPlainTextEdit auto scrolling feature doesn't work
reliably when appending wrapping lines. Here's a minimal compilable
example to reproduce the problem:
// main.cpp
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QPlainTextEdit textEdit;
textEdit.show();
QTimer timer;
QSignalMapper mapper;
mapper.setMapping(&timer, QString(100, 'Q')); // works with
something short, for example QString(10, 'Q')
app.connect(&timer, SIGNAL(timeout()), &mapper, SLOT(map()));
app.connect(&mapper, SIGNAL(mapped(QString)), &textEdit,
SLOT(appendPlainText(QString)));
timer.start(1000);
return app.exec();
}
Just sit back and wait until vertical scroll bar appears. For me the
problem occurs with 4.4.0-snapshot-20080220.
--
[ signature omitted ]
Message 2 in thread
Hi,
Update: this problem still occurs with 4.4.0-beta1.
--
[ signature omitted ]