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

wrong keyboard selection behavior in QLineEdit (inconsistent with QTextEdit)

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Windows 10

    • Platform/s:
      Windows

      Description

      Selection behavior is wrong in QLineEdit and is different from for example QTextEdit.

      Lets assume I have a text "abcde" in line edit. I select "bcd" so that cursor is at right side of letter "d".

      In QLineEdit when I press right arrow key, the selection is cleared and cursor skips to the right side of letter "e". While in QTextEdit the selection is cleared and cursor stays at the end of selection, i.e. to the right of letter "d".

      If, with the same selection, I pressed left arrow key in QLineEdit, then the selection gets cleared and cursor would skip to the right of letter "c". While in QTextEdit it would jump to the beginning of the selection, i.e. to the right of letter "a".

      It seems to me that the behavior observed in QTextEdit is correct and is consistent with other applications. Behavior of QLineEdit is incorrect.

      Note: on Linux and macOS it works well and QLineEdit behaves the same as QTextEdit. The problem seems to be on Windows only.

      Note 2: the same problem is with editable QComboBox

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            vladimir.kraus Vladimir Kraus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes