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

ComboBox selection behavior is eratic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.4.2, 5.5.1, 5.6
    • None
    • Arch Linux, Qt 5.5.1, 64bit
      Windows 7 64 bit

    Description

      QComboBox is behaving strange when used together with a model.

      Please build and run the attached demo.

      You will see a combobox with a QStandardItemModel containing four text items.

      Then you got a button, clicking that will print the data found in comboBox->view()->currentIndex()

      Finally there is a label to print the data into.

      How to reproduce:

      1) Start the application.

      2) click on button

      Expected result:
      "Item 1" is printed.

      Actual result:
      "<NOTHING>" is printed: There is currently no current item!

      3) Open the combobox and click on "Item 1"

      4) Click the button

      Expected result:
      "Item 1" is printed

      Actual result:
      "Item 1" is printed. Nice

      5) Open the combobox again, hover (do not click) "Item 3" and then close the combobox again by clicking outside of the popup area.

      6) Click the button

      Expected result:
      "Item 1" is printed

      Actual result:
      "Item 3" is printed

      Attachments

        Issue Links

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

          Activity

            People

              mmutz Marc Mutz
              hunger Tobias Hunger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes