Qt World Summit: Register Today!

Qt 5.8 RC on Android: FileDialog opens behind Popup

  • This is what happens when I try to run the code below on Android 4.1.1 device.
    Press "Open popup", then "Open FileDialog": FileDialog is opened, but it is positioned behind the Popup. How can I make FileDialog show up in front of the Popup? Tweaking the "modality" property of FileDialog and "z" property of Popup did not help. And yes, I need the Popup to be modal.
    When buildling wIth Qt 5.7, FileDialog is displayed correctly on the same Android device, that is, in front of the Popup. So, is this a bug introduced in 5.8 RC? Should I file a bug report?

    import QtQuick 2.7
    import QtQuick.Controls 2.1
    import QtQuick.Layouts 1.3
    import QtQuick.Dialogs 1.2
    ApplicationWindow {
        visible: true
        width: 640; height: 480
        title: qsTr("Hello World")
        Button { text: qsTr("Open popup"); onClicked: popup.open() }
        Popup {
            id: popup
            x: 220; y: 140; width: 200; height: 200
            modal: true
            Button { text: qsTr("Open FileDialog"); onClicked: fileDialog.open() }
            // z: -1 // Does not help.
        FileDialog {
            id: fileDialog
            title: qsTr("File dialog")
            // modality: Qt.ApplicationModal // Does not help either.

  • Lifetime Qt Champion


    Can't check that but from your description it looks like a change of behaviour. You should first search the bug report system to see if it's something known. If not then yes, open a new report providing a minimal compilable example showing the behaviour.

  • Filed a bug QTBUG-57859

Log in to reply