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

QML Popup doesn't totally follow closePolicy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.12.0, 5.12.3
    • Quick: Controls 2
    • None
    • All

      Popup (and Menu) QML Type doesn't work as intended if it is placed in a file that has an Item as a root element. 

      With Popup's default settings or with next implicitly stated settings:
      modal: false
      closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
      Popup can't be closed with anything but using Escape key. Replacing Item root element with Window fixes this behavior. 

      Alternative option so far is to make Popup modal and style it's background with transparent Rectangle:
      modal: true

      Overlay.modal: Rectangle {

      color: "transparent"}

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            algerman Aleksei German
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes