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

When a ComboBox is embedded within a Popup, scrolling the content past its visible area will not trigger the closure of the ComboBox's popup.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3
    • Quick: Controls 2
    • None
    • All

    Description

      import QtQuick
      import QtQuick.Controls.Basic
      import QtQuick.Window
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          Button{
              text: "open"
              onClicked: popup.open();
          }
          Popup {
              id: popup
              width: 400
              height: 200
              anchors.centerIn: parent
              clip: true
              closePolicy: Popup.CloseOnPressOutside
              contentItem: Flickable {
                  id: flickable
                  clip: true
                  topMargin: 10
                  contentWidth: implicitWidth
                  contentHeight: 500
                  ScrollBar.vertical: ScrollBar { width: 14 }
                  /*onMovementStarted: {
                      for (let item of contentItem.children) {
                          if (item.objectName === "__ComboBox__")
                              item.popup.close();
                      }
                  }*/
                  ComboBox {
                      width: 160
                      height: 40
                      objectName: "__ComboBox__"
                      model: ["aaaaaa", "bbbbbb", "cccccc", "dddddd"]
                  }
              }
          }
      } 

      In the aforementioned code, when the ComboBox is opened and the mouse wheel is used to scroll the Flickable, the following bug occurs:

      Enabling clip: true for all items does not result in clipping because the ComboBox.popup is also a popup window. I hope it can be fixed as soon as possible.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            menpens menv pengsheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes