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

Not possible to close a modal ComboBox popup by clicking on the ComboBox

    XMLWordPrintable

Details

    Description

      Desktops typically have modal popups for combo boxes. Currently there is no modal flag for ComboBox exposed, which means that when a ComboBox is open and user wishes to dismiss it by clicking somewhere else on the window, it actually registers that as a click. So it could lead to unintended action being taken.

      One could almost do it with popup.modal: true already though. Only issue is that combobox cannot be closed by clicking the combobox button itself while the popup is open.

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          id: window
          width: 600
          height: 400
          visible: true
      
          ComboBox {
              model: 10
              popup.modal: true
              popup.y: height
          }
      
          Switch {
              x: 200
              y: 100
              text: "I shouldn't respond to clicks when the popup is open"
          }
      }
      

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: