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

QLineEdit: Placeholder text is aligned to the right

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.6.2
    • 5.6.0, 5.6.1
    • None
    • Windows 7, Hebrew enabled but active locale is English
    • 589e34eb3210d8725d68941dbeb096424dda68df

    Description

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

      See the attached files. The placeholder text is aligned to the right, while the user text is aligned correctly.

      Even when there is no placeholder text, the cursor appears on the right edge.

      setLayoutDirection(Qt::LeftToRight) doesn't help.

      Attachments

        1. placeholder.png
          placeholder.png
          15 kB
        2. text.png
          text.png
          15 kB
        3. placeholder-animation.gif
          placeholder-animation.gif
          17 kB

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              orgads Orgad Shaneh
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes