Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.4.0
-
None
Description
On Qt for Mac, If many lines are added quickly using the appendPlainText slot QPlainTextEdit often misrenders the text after a resizing of the window... it doesn't render some or all of some of the lines, so that the display looks wrong and is hard to read.
This can be seen with the following example :
#include <QtGui>
class MyTextEdit : public QPlainTextEdit
//class MyTextEdit : public QTextEdit
{
Q_OBJECT
public:
MyTextEdit();
private slots:
void AddSomeText();
};
MyTextEdit :: MyTextEdit()
{
setReadOnly(true);
QTimer::singleShot(200, this, SLOT(AddSomeText()));
}
void MyTextEdit :: AddSomeText()
{
static int count = 0;
for (int i=0; i<6; i++)
QScrollBar * sb = verticalScrollBar();
sb->setValue(sb->maximum());
QTimer::singleShot(2000, this, SLOT(AddSomeText()));
}
int main(int argc, char ** argv)
{
QApplication app(argc, argv);
QWidget w;
w.setMinimumWidth(640);
QBoxLayout * vbl = new QBoxLayout(QBoxLayout::TopToBottom, &w);
vbl->setMargin(5);
vbl->setSpacing(5);
MyTextEdit * mpte = new MyTextEdit;
vbl->addWidget(mpte);
w.show();
return app.exec();
}
#include "main.moc"
Attachments
Issue Links
- resulted in
-
QTBUG-2526 QTextEdit does not get drawn correctly after adjusting scrollbar on Mac OS X
-
- Closed
-