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

Modal popups and drawers leak wheel events through

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0
    • Quick: Controls 2
    • None
    • b3619f32c20b5851ada0826ec2e7ddc2ec8a210b

    Description

      It should not be possible to wheel scroll the content through a modal background dim item.

      import QtQuick 2.7
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          id: window
          width: 400
          height: 400
          visible: true
      
          header: ToolBar {
              ToolButton {
                  text: "Open"
                  onClicked: popup.open()
              }
          }
      
          ListView {
              model: 100
              anchors.fill: parent
              delegate: ItemDelegate {
                  width: parent.width
                  text: "\t\tContent " + index
              }
              ScrollIndicator.vertical: ScrollIndicator { }
          }
      
      
          Popup {
              id: popup
              x: 50; y: 50
              implicitWidth: parent.width - 100
              implicitHeight: parent.height - 100
              modal: true
              clip: true
              contentItem: ListView {
                  model: 100
                  delegate: ItemDelegate {
                      width: parent.width
                      text: "Popup " + index
                  }
                  ScrollIndicator.vertical: ScrollIndicator { }
              }
          }
      
          Drawer {
              width: window.width / 3
              height: window.height
              contentItem: ListView {
                  model: 100
                  delegate: ItemDelegate {
                      width: parent.width
                      text: "Left " + index
                  }
                  ScrollIndicator.vertical: ScrollIndicator { }
              }
          }
      
          Drawer {
              edge: Qt.RightEdge
              width: window.width / 3
              height: window.height
              contentItem: ListView {
                  model: 100
                  delegate: ItemDelegate {
                      width: parent.width
                      text: "Right " + index
                  }
                  ScrollIndicator.vertical: ScrollIndicator { }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes