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

QComboBox doesn’t receive some events (e.g. mouseDoubleClickEvent())

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Duplicate
    • Affects Version/s: 5.0.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Say that you have a QTreeView widget which uses an item delegate to show a cell's value using a QComboBox-based widget. Now, the QComboBox-based widget responds to double clicks (through mouseDoubleClickEvent()) to select the next item in the list, and a simple mouse click (through mousePressEvent()) to open the drop-down list when over the arrow area.

      Now, the above works as expected on Windows and Linux, but not on OS X. On Windows and Linux, if you double click on the cell, the editor (QComboBox-based widget) is created and you can double click on it to select the next item in the list or click over the arrow area to show the drop-down list. On OS X however, to double click on the cell will also bring up the editor, but then if you double click again, it will close it. Then, if you double click again, it will open another editor, etc. FWIW, it all used to work fine using Qt 4.8, so it clearly has something to do with Qt 5. It seems like some events are not being propagated or something.

      I have attached some sample code that illustrates the above issue.

        Attachments

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

          Activity

            People

            • Assignee:
              dedietri Gabriel de Dietrich (drgvond)
              Reporter:
              agarny Alan Garny
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes