Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
6.5.0 Beta3
-
None
-
27adb3b91 (dev), 646063ed8 (6.5)
Description
The inherited property from PopUp : opened is not updated when Menu is open and close.
So I can't use this property to toggle the visibility of a menu with a button
import QtQuick import QtQuick.Controls import QtQuick.Window Window{ width: 640 height: 480 visible: true title: qsTr("Hello World") Button{ id:button anchors.centerIn: parent text: "menu button" onClicked: { print(menu.opened) if(menu.opened){ menu.close() } else{ menu.open() } } } Menu { id: menu x: 0 y: parent.height/2 + button.height/2 + 10 MenuItem { text: "Choix 1" } MenuItem { text: "Choix 2" } } }
Attachments
Issue Links
- duplicates
-
QTBUG-63614 Add button that can toggle menu visibility
-
- Reported
-