An error occurred while loading the file. Please try again.
-
Morten Sorvig authored
Remove the model property from ContextMenu, will add later.
cebdbdc5
Menus.qml 613 B
import QtQuick 1.0
import "../components"
Rectangle {
width: 540
height: 340
color: "green"
id : rect
ContextMenu {
id : editMenu
MenuItem { text : "blue"
onSelected : { rect.color = "blue" }
}
MenuItem { text : "red"
onSelected : { rect.color = "red" }
}
MenuItem { text : "pink"
onSelected : { rect.color = "pink" }
}
}
MouseArea {
anchors.fill: parent
acceptedButtons : Qt.RightButton
onClicked: editMenu.showPopup(mouseX, mouseY)
}
}