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

ContextMenu on a Dialog doesn't open

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • None
    • 6.10
    • Quick: Controls 2
    • None

      import QtQuick
      import QtQuick.Controls.Basic
      
      ApplicationWindow {
          id: window
          width: 600
          height: 400
          visible: true
      
          TapHandler {
              onTapped: dialog.open()
          }
      
          Dialog {
              id: dialog
              width: 200
              height: 200
      
              contentItem.ContextMenu.menu: Menu {
                  Action {
                      text: "Test"
                  }
              }
      
              // Also doesn't work
              // Rectangle {
              //     color: "tomato"
              //     anchors.fill: parent
      
              //     ContextMenu.menu: Menu {
              //         Action {
              //             text: "Test"
              //         }
              //     }
              // }
          }
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes