I am using Qt 4.3.0 on Windows
There seems to be a serious problem with QTextEdit when using
setLineWrapMode(QTextEdit::NoWrap)
To copy to clipboard, switch view to plain text mode
The problem is that when typing toward the bottom of a moderately large text file, the interface starts dragging and becomes very slow - the difference is striking between the top and bottom of the document, and I think it gets worse for larger files.
If I remove the "setLineWrapMode" line, then everything works fine.
For a long time, I blamed it on my syntax highlighter, but now I'm quite certain that it's a Qt bug... Anyone encounter this kind of behaviour, or have an idea for a workaround?
Not sure if it's 4.3.0-specific, Windows-specific (or even my-particular-computer-specific
)
Thanks.
edit: Here's a sample program that produces the behaviour:
#include <QApplication>
#include <QTextEdit>
int main(int argc, char *argv[]) {
edit.showNormal();
bool ret=app.exec();
return ret;
}
#include <QApplication>
#include <QTextEdit>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QTextEdit edit;
edit.setLineWrapMode(QTextEdit::NoWrap);
edit.showNormal();
bool ret=app.exec();
return ret;
}
To copy to clipboard, switch view to plain text mode
Bookmarks