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

Automatically break grab from other items when a dialog is shown

    XMLWordPrintable

Details

    Description

      While user is interacting with something, like dragging an item or using items such as Flickable or Slider and some popup dialog opens (modal or not), those items are still keeping the grab and are getting the input.

      This could be a problem for example if the dialog opens in front of a Slider, so the user could still change its value without knowing while still holding the screen.

      Currently it could be worked around by disabling whole contentItem of the window, but this wouldn't work for multiple dialogs and also changes the appearance.

      For example:

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls 2.15
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          Slider {
              onValueChanged: if (value > 0.5) d.open()
          }
          Dialog {
              id: d
              modal: true
              Text {
                  text: "hello"
              }
          }
      }
      

      Attachments

        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
            poikelin Joni Poikelin
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes