Solved Response to back (navigation) key: C++ based android app built in Qt
-
How can I introduce the function which takes to the recent previous screen of the app whenever back key (android navigation key) is pressed? Currently, it exits/closes the app whenever the user click the back button. The app is built using the C++ language only, QML is not involved at all.
-
You need to add an eventFilter to your mainwindow, grab key events there and do what you wish - perhaps send a signal to your UI objects.
-
@mvuori @Davronito thank you for kind suggestions, I've successfully implemented it. Lack of experience with Qt leads me to ask such basic questions.
-