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

Editable QComboBox changes currentIndex when all text is selected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.2
    • 4.8.2, 5.3.1
    • None
    • Windows 7 64 bit, Ubuntu Linux 64 bit
    • e610ef8c8d156f8e70a51c719458eaea1b2266a8

    Description

      I have an editable QComboBox box and connected the lineEdit::returnPressed()-Signal to a slot that appends the currentText() to a QTextEdit log.

      Now the following happens:

      1. Input "111" and press key return -> "111" appears in the log (Ok)
      2. Input "222" and press key return -> "222" appears in the log (Ok)
      3. Press key LineUp, to choose "111" again, press Ctrl+A to select all text, press key return -> "222" appears in the log (Wrong: expcted "111"). Also, the combo box now contains "222"

      I found this because I wanted to always selectAll() text after Enter is pressed to ease the next input.

      Attachments

        1. comboboxtest.png
          comboboxtest.png
          9 kB
        2. ComboBoxTest.zip
          2 kB
        3. qtbug41288_stack.txt
          16 kB
        4. qtbug41288.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aha_1980 André Hartmann
            aha_1980 André Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes