I'm using Qt Quick Controls 2 and write this code for context menu:
Menu{
id: contextmenu
x: ( parent.width - contextmenu.width ) / 2
y: ( parent.height - contextmenu.height ) / 2
modal: true
property int selid
MenuItem {
text: "Compare"
visible: isexp
}
Divider{ visible: isexp }
MenuItem {
text: "Send..."
visible: isexp
}
Divider{ visible: isexp }
MenuItem {
text: "Edit..."
}
Divider{}
MenuItem {
text: "Delete"
}
}
Divider - it is my component. isexp is is property of object. When isexp false menu is shows wrong. See screenshot: https://s31.postimg.org/c608kdtbv/qqq.png
How to change visibility of menu items and show menu properly. Thank for advice.