diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/unityqmlmenumodel.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/unityqmlmenumodel.qml b/examples/unityqmlmenumodel.qml index d38d6e5..a66ba8e 100644 --- a/examples/unityqmlmenumodel.qml +++ b/examples/unityqmlmenumodel.qml @@ -14,6 +14,7 @@ Item { } ListView { + id: listview anchors.fill: parent anchors.margins: 10 spacing: 3 @@ -25,7 +26,7 @@ Item { Component { id: separator Rectangle { - width: parent.width + width: listview.width height: 4 color: "blue" } @@ -34,7 +35,7 @@ Item { Component { id: menuitem Rectangle { - width: parent.width + width: listview.width height: 40 color: "#ddd" Text { @@ -44,6 +45,10 @@ Item { color: sensitive ? "black" : "#aaa"; text: label } + MouseArea { + anchors.fill: parent + onClicked: listview.model.activate(index); + } } } } |