Priority: Not Evaluated
Resolution: Out of scope
Affects Version/s: 4.7.3
Fix Version/s: None
Component/s: (Inactive) GUI: QWS Integration (Qt4)
Environment:Both Windows 7 and Ubuntu.
There appears to be an easy way to cause a QTextWidget to lose data while it is being loaded. The QsciScintilla widget does not appear to suffer the same problem.
To see the bug, do the following:
1. Run the attached python script: qtextedit_demo.py. This script has nothing to do with Leo.
2. Click the "Add Text" button.
3. Now click the text area until text appears.
4. Immediately click again to set the cursor and immediately type <return>.
5. Type Ctrl-End to put the cursor at the end of the text.
6. Notice that there are less than 500000 lines of text in the widget! Alas, the text never gets updated after you type the <return>.
Afaik, there is no signal that would allow code to detect this condition, so the data loss will go undetected.
Unless I am mistaken (and I do hope I am), this is a fatal flaw in the QTextEdit class. This behavior exists in both Ubuntu and Windows: it is not a trait of the underlying OS widget.
This is a major problem for my app, Leo: http://leoeditor.com/ Leo users (probably) haven't noticed this loss because the initial update of small body text happens quickly. But it is a fatal defect when trying to load, say, 10,000 lines of code.
Edward K. Ream