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

Destroying a modal Dialog with exit transition blocks all mouse input to other dialogs

    XMLWordPrintable

    Details

    • Commits:
      51d416cdfd909aacd5047632a7cc1661a158731a (qt/qtquickcontrols2/dev) 2f84f44840a38d2a2cb1b0e4ba6478f2e0946dbc (qt/qtquickcontrols2/6.0) 7e819a5777a0632175347688312da9cee0702177 (qt/tqtc-qtquickcontrols2/tqtc/lts-5.15)
    • Sprint:
      UI Bug Fixing Q1/2021

      Description

      In attached project, press Esc to close the top most Dialog, then try to press the Button.

      Somehow the exit transition leaves the overlay hanging.

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Window 2.15
      
      ApplicationWindow {
          id: mainWin
          width: 1000
          height: 1000
          visible: true
          title: qsTr("Hello World")
      
          Component {
              id: dlg
      
              Dialog {
                  dim: true
                  modal: true
                  closePolicy: Popup.CloseOnEscape
      
                  Column {
                      Text {
                          text: "button is " + (button.down ? "down":"up")
                      }
      
                      Button {
                          id: button
                          text: "Try to press this button"
                      }
                  }
              }
          }
      
          Component {
              id: brokenDlg
              Dialog {
                  dim: true
                  modal: true
                  closePolicy: Popup.CloseOnEscape
      
                  Text {
                      text: "Press Esc key to reject this dialog"
                  }
      
                  exit: Transition {
                      NumberAnimation { property: "opacity"; from: 1.0; to: 0.0 }
                  }
              }
          }
      
      
          Component.onCompleted: {
              var d1 = dlg.createObject(mainWin, {visible:true, x: 290, y: 340})
              var d2 = brokenDlg.createObject(mainWin, {visible:true, x: 300, y: 350})
      
              d1.onRejected.connect(function func1(){
                  d1.destroy();
              })
              d2.onRejected.connect(function func1(){
                  d2.destroy();
              })
          }
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            mitch_curtis Mitch Curtis
            Reporter:
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes