Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
5.8.0 Beta, 5.8.0 RC
-
None
-
Qt: qt-opensource-linux-x64-android-5.8.0-rc, qt-opensource-linux-x64-android-5.8.0-beta
Build host: Ubuntu 64bit
Build targets: Android armeabi-v7a
Tested on Android 4.1.1 device
Description
If a scene contains an opened Popup (or a Popup-derived type), and one of QtQuick.Dialogs 1.2 dialogs (ColorDialog, FontDialog, FileDialog) is opened, the opened dialog is positioned behind the Popup (see attached images), instead of being positioned in front of it. However, MessageDialog from QtQuick.Dialogs 1.2 works correctly - it appears in front of the Popup.
With Qt 5.7 all the dialogs are displayed correctly - in front of the Popup.
Using the same dialogs from Qt.labs.platform 1.0 also works correctly in Qt 5.8 RC, so importing dialogs from Qt.labs.platform (see its limitations in Qt Docs) can be used as a workaround until the bug is fixed.
The bug has been reproduced only on Android, but maybe it also affects other (mobile?) platforms.
Steps:
- launch the app (see attached sources) and click the button "Open popup". A popup is opened with a list of dialog names.
- click "File Dialog"/"Color dialog"/"Font dialog" from the list. The corresponding dialog opens
- EXPECTED: the dialog opens in front of the Popup
- ACTUAL: the dialog opens behind the Popup
import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 import QtQuick.Dialogs 1.2 // import Qt.labs.platform 1.0 // With this import, dialogs are displayed correctly. ApplicationWindow { visible: true width: 640; height: 480 title: "Hello World" Button { text: "Open popup"; onClicked: popup.open() } Popup { id: popup x: 220; y: 140; width: 200; height: 200 modal: true z: -1 // Does not help - dialogs are still behind the Popup. ListView { clip: true anchors.fill: parent model: [fileDialog, colorDialog, messageDialog, fontDialog] delegate: ItemDelegate { text: modelData.title onClicked: modelData.open() } } } ColorDialog { id: colorDialog; title: "Color dialog" } FontDialog { id: fontDialog; title: "Font dialog" } FileDialog { id: fileDialog title: "File dialog" modality: Qt.ApplicationModal // Does not help either. } // Only MessageDialog is displayed above the Popup. MessageDialog { id: messageDialog; title: "Message dialog" } }