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

QLineEdit: placeholder text affects cursor position

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.1.1
    • 5.1.0 RC1
    • None
    • Windows 7
    • qtbase/stable: cfd207212de785d98fe716fec2158417ba0a9fdf

    Description

      Now that an empty QLineEdit keeps placeholder text visible when focused (https://qt.gitorious.org/qt/qtbase/commit/eeb31ad), the cursor blinks incorrectly on top of the placeholder text on windows.

      Test case:

      #include <QtWidgets>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QLineEdit le;
          le.setPlaceholderText("Foo");
          le.show();
          return a.exec();
      }
      

      Notice that when you enter "F" and move the cursor in front, the cursor is in the correct position. When you erase "F", the cursor goes back to the incorrect position on top of placeholder "F".

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes