Modal dialogs not working on Android



  • I have a modal dialog box MDBox.qml that contains
    @
    // . .
    Window{
    id: root
    modality: Qt.ApplicationModal
    flags: Qt.Dialog | Qt.WindowStaysOnTopHint
    // Properties
    signal buttonSelected(string name)
    // Various components, such as Rectangle, Text and Button
    }
    @

    This is referenced in MyScreen.qml with id mdbox and I set mdbox.visible = true. mdbox.visible = false is set when the OnButtonSelected signal is received by MyScreen.qml from mdbox. MyScreen contains
    @
    // . . .
    mdbox.visible = true;
    // . . .
    MDBox{
    id: mdbox
    visible: false
    // . . .
    OnButtonSelected: {
    // . . .
    mdbox.visible = false;
    }
    }
    // . . .
    @

    When I run this in QT Creator with Qt 5.4 on Windows 8 64 bit, the modal dialog box appears and disappears as expected. However, when it's run on an Android device or emulator, it appears but never disappears. Does anyone know why this happens and how to fix this problem?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.