QTextEdit lags when starting to write
-
Tried with Qt 5.11.0 on MacOS. I did not see the issue. Very difficult to tell what is the issue. Can you try simple example with only QTextEdit ? Does it give the same issue ? Can you try with simple lineEdit as well ? Does it also give the same issue ?
-
I've tried with a normal QTextEdit example and I did not see the issue. LineEdit does not appear to have the issue either.
-
Hi,
What do you mean by normal QTextEdit ? How is it different from the one you are seeing that delay on ?
-
With "normal" I mean I used the example on qt's own website, nothing flashy, fancy, compile heavy or uses tons of include files to fix problems impractically.
-
With "normal" I mean I used the example on qt's own website, nothing flashy, fancy, compile heavy or uses tons of include files to fix problems impractically.
Hi @legitnameyo,
The question was more: what is different in your text edit to the plain Qt one? Obviously there is a difference.
-
The difference is that I changed the code in the HTML BEFORE the program even launched. Ever if I delete the change, the lag persists. The only thing that works is creating a new QTextEdit inside the project. As soon as I double click it and edit anything, the text edit lags when I start writing in it after compile and launch.
-
Then you have to write down a minimal compilable example that shows that behaviour. We currently can only do guess jobs about what might going on.
-
I can do it in steps:
1. Start QT creator 2. Create a regular desktop project 3. Add a QTextEdit 4. Double click on it and write something in the HTML edit tab that pops up 5. Save and compile 6. Start it, and the close the program 7. Double click on the QTextEdit and remove the added text 8. Save all and compile 9. Laggy text after you start the program
That's a overly detailed example of what makes QTextEdit lag on my computer. It's all about adding and removing text once in the QTextEdit after double clicking on it
-
I can do it in steps:
1. Start QT creator 2. Create a regular desktop project 3. Add a QTextEdit 4. Double click on it and write something in the HTML edit tab that pops up 5. Save and compile 6. Start it, and the close the program 7. Double click on the QTextEdit and remove the added text 8. Save all and compile 9. Laggy text after you start the program
That's a overly detailed example of what makes QTextEdit lag on my computer. It's all about adding and removing text once in the QTextEdit after double clicking on it
@legitnameyo what happens, if you don't add text with the designer, but by program?
-
I have the exact same issue
#include <QtWidgets/QApplication> #include <QtWidgets/QTextEdit> int main(int argc, char* argv[]) { QApplication a(argc, argv); QTextEdit textEdit; textEdit.show(); return a.exec(); }
Just this is enough to make
QTextEdit
lag like @legitnameyo said.
Maybe because of different hardware but on my PC it takes about 0.5 seconds before something appears in the text edit.EDIT: yes it happens even in Release mode without a debugger attached
Qt: 5.13.0 msvc2017_64