[Interest] Modal busyIndicator in Android

Federico Buti bacarozzo at gmail.com
Wed Jun 3 04:07:34 CEST 2015


Hi list,

in the attempt to look as native as possible, I've defined a QML busy
indicator for Android as follows:

Dialog {

    property alias text: labelWorking.text

    standardButtons: StandardButton.NoButton

    RowLayout {

        BusyIndicator {

            id:busy

            opacity: 0.85

            Layout.alignment: Qt.AlignLeft

        }


        Text {

            id: labelWorking

            horizontalAlignment: Text.AlignHCenter

            verticalAlignment: Text.AlignVCenter

            Layout.alignment: Qt.AlignRight

            color: "#454343"

            styleColor: "#777777"

            style: Text.Sunken

        }

    }


    Keys.onPressed: {

        if (event.key == Qt.Key_Back) {

            console.log("Back button captured - wunderbar !")

            event.accepted = true

        }

    }

}


As you can see it is quite simple but works perfectly fine for my needs.
However, the dialog should be "fully modal" and It should be dismiss ONLY
when the related background task is terminated. As it is now, the dialog is
dismiss as soon as the Android back button is pressed, which is wrong for
my use case. How can I handle it?

Thanks in advance,
F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150603/37875582/attachment.html>


More information about the Interest mailing list