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

Lines overlap in QTextEdit, when multiple lines are inserted from Google Docs document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.5.1, 5.6.0, 5.7.0
    • None
    • My system: Windows 8.1 x64, project compiled with mingw 5.3.0. I was also able to reproduce it on Windows 7 and Kubuntu 15.10.

    Description

      How to reproduce bug:

      1. Create a new document in Google Docs with multiple lines, for example with this content :

        first line
        second line

      2. Create Qt Widgets Project with following code; build and run it:
        main.cpp
        #include <QApplication>
        #include <QTextEdit>
        
        int main(int argc, char *argv[])
        {
            QApplication a(argc, argv);
        
            QTextEdit te;
            te.show();
        
            return a.exec();
        }
        
      3. Copy both lines from the document and insert it into QTextEdit
      4. You can see now that the second line overrides the first line

      This happens only if the selected text contains the end of line and is inserted at the first position of QTextEdit. It seems that the problem is in the line spacing: I was able to move one line from another by pressing the Enter many times.

      Attachments

        1. qtbug52604_qtextedit.zip
          0.6 kB
        2. 1.PNG
          1.PNG
          3 kB
        3. 2.PNG
          2.PNG
          3 kB

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              aizenbit aizenbit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes