Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Quick 6.9+ ContextMenu on Android - does it work?
Qt 6.12 LTS is out! See what's new in the release blog

Qt Quick 6.9+ ContextMenu on Android - does it work?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 419 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.
  • G Offline
    G Offline
    Grumegargler
    wrote on last edited by
    #1

    Another stumbling block for a seemingly basic task: is there a way to use my own context menu on Android?

    If the documentation says:

    The ContextMenu attached type provides a way to open a context menu in a platform-appropriate manner,

    then why doesn’t this work?

    import QtQuick
    import QtQuick.Window
    import QtQuick.Controls
    
    ApplicationWindow {
        visible: true
        width: 360
        height: 520
    
        Rectangle {
            width: 200
            height: 200
            color: "red"
    
            ContextMenu.menu: Menu {
                MenuItem { text: "Option 1" }
            }
        }
    }
    

    I'm assuming that long tap on the red square should show me the context menu, but it doesn't happen.

    —
    Android 15+

    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
    • Unsolved