Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41153

QTextEdit: apparent data loss for large text

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 4.7.3
    • None
    • Both Windows 7 and Ubuntu.

    Description

      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
      edreamleo@gmail.com

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            edreamleo Edward K. Ream
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes