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

ContextMenu on a Dialog doesn't open

    XMLWordPrintable

Details

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

    Description

      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"
              //         }
              //     }
              // }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes