Unsolved How "showMinimized" on Android
-
Hello,
I want use
showMinimized()
function of ApplicationWindow to reduce the application when the user click on button of device to close it.The goal is don't to close the application if the user types the wrong button on his phone. (I have to do this to temporarily solve this problem)
On my PC this correctly works, but not on Android device.
Do you know how I can do this?
Tank you in advance.
Charlie
-
Hi,
There's no concept like showMinimized on mobile platform. Your application is either active and full-screen or inactive and in the back..
-
Hi,
Thank you for your answer. I don't find the way to force inactive state of my app without use
myApp.close()
ourQt.quit()
. Is it possible ? -
It should go automatically when going in background.
Do you have specific stuff to do when that happens ?
-
Not exactly...
I am currently working on a application for PC and Android using WebView. With Android, I meet problems of safeguarding the collected informations (login, password, configuration, ...).
For now the only simple way I found to solve this problem is to block the closure of the program, especially when the user clicks the back button on the phone (the
Qt.Key_Back
). Currently I am therefore well:ApplicationWindow { // .... onClosing: { close.accepted = false } // .... }
Now I want to do the same action with the button when the user presses the center button of the phone (a Samsung S6 for example) :
ApplicationWindow { // .... // Either by onClosing: { close.accepted = false // do something ... } // Either by FocusScope { id: focusScope focus: true anchors.fill: parent Keys.onReleased: { if(event.key === Qt.Key_Back) { // do something ... } } // .... } // Either by ???? }
Have you an idea ?
Good night & Thank you very much.
Charlie
-
I'd suggest asking on the interest mailing list about that session data saving problem. You'll find there Qt's developers/maintainers. This forum is more user oriented.