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

    • c39f407a5 (dev), ea28fc656 (6.5)

    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

        Issue Links

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

          Activity

            People

              tokorpip Tomi Korpipää
              poikelin Joni Poikelin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes