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

QTextEdit does not display cursor on wrapped lines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • Some future release
    • 4.6.2
    • GUI: Text handling
    • None
    • libqt4-x11-4.6.2-105.1.i586; openSuse 11.2

      I have a QTextEdit:
      QTextEdit *e = new QTextEdit(0);
      e->setWordWrapMode(QTextOption::WordWrap);

      when I now just press and hold a letter to create a long line, I will get a horizontal scrollbar. Now when the scrollbar is visible and the cursor is at the rightmost position, I enter some Space characters. But what happens is:

      • I do suddenly not see the cursor anymore
      • the space characters are also not shown
      • the scrollbar does not shrink (does not change at all).

      It's like space chars are simply ignored somehow but not entirely.

      The most problem here is the disappearing cursor. This not only happens when I enter the space chars, but also when I later on move the cursor
      to the end of this long line by pressing the "End" key.

      The spaces however are still kept somehow in the widget, because after pressing the "End" key and selecting the whole line via "Shift + Pos1", then copy, paste into another text editor shows me all spaces I entered.

      This problem might be related to http://bugreports.qt.nokia.com/browse/QTBUG-4052

      Testing the same with a Q3TextEdit shows, that this widget works correctly in that regard.
      So this is a regression to Qt3

        1. whitespacewrap.tgz
          2 kB
        2. textedit.tar
          30 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            mkoller Martin Koller
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes