Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android: back swipe issues
Qt 6.11 is out! See what's new in the release blog

Android: back swipe issues

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 239 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FredSwe
    wrote on last edited by FredSwe
    #1

    Hi all,

    I'm having an issue on Android when the device is configured for navigating using swipe gestures (Android 10+ features).
    When the user performs a back gesture, the Keys.onReleased is fired as expected. However, a mouse click is also fired at the same time which I don't think is correct. Is there anyway to avoid that?

    Below is a short snippet that shows the problem.

    import QtQuick
    import QtQuick.Window
    
    Window
    {
        MouseArea
        {
            anchors.fill: parent
            onClicked:
            {
                console.log("clicked")
            }
        }
    
        Keys.onReleased:
        {
            if(Qt.platform.os === "android")
            {
                if (event.key === Qt.Key_Back)
                {
                    event.accepted = true
                    console.log("navigate back")
                    //navigateBack()
                }
            }
        }
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved