Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.9.0 Beta 2
-
None
Description
When setting the "visible" property of a MenuItem to "false" then the item is hidden but a placeholder remains visible. A dirty work-around is to set the item's heigh to "0":
Menu { modal: true id: menu MenuItem { text: qsTr("Option 1") } MenuItem { id: item2 text: qsTr("Option 2") } MenuItem { visible: bOption3Visible text: qsTr("Option 3") height: bOption3Visible?item2.height:0 // hack } }
Attachments
Issue Links
- duplicates
-
QTBUG-54767 Qt.Quick.Controls 2.0 MenuItem appears even when visible:false
- Open
- relates to
-
QTBUG-79645 Spacing for invisible ListView delegate not removed
- Reported