Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134903

Duplicate context menus when using custom context Menus in text controls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.10
    • Quick: Controls 2
    • None

    Description

      To reproduce:

      1. Open e.g. texteditor example
      2. Right click; our text editing context menu will be shown, but once it's closed, another native one will still be visible

      Windows isn't affected as it opens context menus on release.

      The workaround is to only open context menus on press on non-Windows systems:

          TapHandler {
              acceptedButtons: Qt.RightButton
              onPressedChanged: {
                  if (pressed)
                      contextMenu.popup()
              }
          }
      

      However, this should be refined to respect the platform's press vs release policy: https://doc.qt.io/qt-6/qstylehints.html#contextMenuTrigger-prop

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-134903
          # Subject Branch Project Status CR V

          Activity

            People

              mitch_curtis Mitch Curtis
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews