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

SplitView's handle not propagating mouse events

    XMLWordPrintable

Details

    • Windows

    Description

      When there is a button on a SplitView's handle, the handle does not allow mouse events to make it to the button.

      This behavior was not observed in 6.2.4

      According to the official documentation,
      "Handles should be purely visual and not handle events, as it can interfere with their hovered and pressed states."
      That being said if this was functioning and propagating beforehand it's uncertain which state is the intended state.

       

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          SplitView {
              anchors.fill: parent
              handle: Rectangle {
                  color: "green"
                  implicitWidth: 100
      
                  Button {
                      text: "Click Me"
                      onClicked: console.log("clicked")
                      anchors.horizontalCenter: parent.horizontalCenter
                  }
              }
      
              Rectangle {
                  SplitView.fillHeight: true
                  SplitView.preferredWidth: 300
                  color: "red"
              }
      
              Rectangle {
                  SplitView.fillHeight: true
                  SplitView.fillWidth: true
                  color: "blue"
              }
          }
      }
      

      See attached project for the full example showing the lack of propagation.

      Attachments

        1. SplitView.zip
          2 kB
          Kevin Zhang
        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
            kevin.zhang Kevin Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes