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

Modal Popup causes Drawer to open when dismissed via touch

    XMLWordPrintable

Details

    • bc0fdae8fad4e199792b3f00ebcb74bd80473227

    Description

      If you have a Drawer, and you show a modal Popup, and then dismiss the popup via touch (by tapping outside the popup), the Drawer is opened.

      This only happens when using touch, clicking with the mouse works ok.

      I'm using Windows 10, winrt x86, not tried other platforms.

      Here is a demo app that should reproduce the problem:

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.0
      
      ApplicationWindow {
          id: window
          
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
          header: ToolBar {
              RowLayout {
                  anchors.fill: parent
                  
                  ToolButton {
                      text: "Open Drawer"
                      onClicked: drawer.open()
                  }
                  
                  ToolButton {
                      text: "Open Popup"
                      onClicked: testPopup.open()
                  }
              }
          }
          
          Drawer {
              id: drawer
              
              width: 0.66 * window.width
              height: window.height
              
              Pane {
                  Label {
                      anchors.centerIn: parent
                      text: "A Drawer"
                  }
              }
          }
          
          Popup {
              id: testPopup
              
              contentWidth: content.width
              contentHeight: content.height
              modal: true
              focus: true
              dim: false
              
              Rectangle {
                  id: content
                  
                  color: "yellow"
                  width: 300
                  height: 200
                  
                  Label {
                      anchors.centerIn: parent
                      text: "A Popup"
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            rupert_d Rupert Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes