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

MouseArea inside SplitView item takes mouse events away from Splitview handle

    XMLWordPrintable

Details

    • Windows
    • 80166d58a1 (qt/qtdeclarative/dev) 80166d58a1 (qt/tqtc-qtdeclarative/dev) c9df284c19 (qt/qtdeclarative/6.4) c9df284c19 (qt/tqtc-qtdeclarative/6.4) 4f13770dda (qt/qtdeclarative/6.3) 4f13770dda (qt/tqtc-qtdeclarative/6.3) 4f13770dda (qt/qtdeclarative/6.3.2)

    Description

      I am using qt quick controls 2 SplitView and it seems like any MouseArea inside the SplitView's item takes mouse events away from the SplitView handle. This means that dragging the handle is not possible when the handle is over a component that has a MouseArea, e.g. Button, inside the SplitView's item.

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.13
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          SplitView {
              id: splitView
              anchors.fill: parent
              handle: Rectangle {
                  id: handle
                  implicitWidth: 20
                  color: "red"
              }
      
              Page {
                  id: firstPage
                  Button {
                      id: button
                      implicitWidth: 100
                      implicitHeight: 50
                      text: "button"
                  }
              }
      
              Page {
                  id: secondPage
              }
          }
      }

      I tried setting the z value of splitView and handle greater than the z value of firstPage and button but that didn't work.

      Attachments

        Activity

          People

            mitch_curtis Mitch Curtis
            kazuto_ute Tim Chandra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: