Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.9
- import QtQuick.Window 2.2
- import QtQuick.Controls 2.3
- import QtQml 2.3
- Window {
- visible: true
- width: 640
- height: 480
- Menu {
- id: contextMenu
- MenuItem {
- text: "Static"
- }
- }
- Instantiator {
- model: 1
- onObjectAdded: {
- contextMenu.insertItem(index, object)
- }
- onObjectRemoved: {
- contextMenu.removeItem(object)
- }
- MenuItem {
- text: "Instantiated"
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- contextMenu.popup()
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement