Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.13.0
-
-
Someone's on it
Description
On Android 9, there is the new feature to switch between apps by swiping on the bottom bar (only on devices without physical display buttons, so not reproducible on Samsung. Needs a Google Pixel or something).
The problem is that using that gesture, a window close event is posted and that causes the application to close in the middle of the gesture. It can be reproduced by running a new template application from QtCreator on a device and use the bottom swipe gesture.
Looking at other apps/toolkits, I don't think the app should close itself when using that gesture. In fact, the app should probably not be aware of that gesture at all (except Qt.application.state will become Inactive). It seems this event is posted erroneously, maybe because of the Android specific implementation for the back button handler, which causes the same event to be posted.
This event can be ignored by implementing the Window's onClosing handler, however, it cannot be distinguished from the actual back button press which probably is the biggest issue (e.g. back should pop a page in the stack, while the swipe gesture should do just nothing).