diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-08-26 03:31:27 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-08-26 04:48:04 (GMT) |
commit | 2af41f34eca0effced19b59d4c3327e3e4b627cb (patch) | |
tree | 593e0ef0f985638a300a68f591eda76a75cf6234 /demos/declarative/rssnews | |
parent | 58a76965e20c4c66ab2dc9cf73aa72b1cfddfbeb (diff) | |
download | Qt-2af41f34eca0effced19b59d4c3327e3e4b627cb.zip Qt-2af41f34eca0effced19b59d4c3327e3e4b627cb.tar.gz Qt-2af41f34eca0effced19b59d4c3327e3e4b627cb.tar.bz2 |
Add quit buttons to declarative demos
Task-number: QTBUG-13048
Reviewed-by: Martin Jones
Diffstat (limited to 'demos/declarative/rssnews')
-rw-r--r-- | demos/declarative/rssnews/rssnews.qml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/demos/declarative/rssnews/rssnews.qml b/demos/declarative/rssnews/rssnews.qml index def3e2c..fb5b5a3 100644 --- a/demos/declarative/rssnews/rssnews.qml +++ b/demos/declarative/rssnews/rssnews.qml @@ -71,6 +71,7 @@ Rectangle { id: categories anchors.fill: parent model: rssFeeds + footer: quitButtonDelegate delegate: CategoryDelegate {} highlight: Rectangle { color: "steelblue" } highlightMoveSpeed: 9999999 @@ -87,7 +88,24 @@ Rectangle { delegate: NewsDelegate {} } } - + Component { + id: quitButtonDelegate + Item { + width: categories.width; height: 60 + Text { + text: "Quit" + font { family: "Helvetica"; pixelSize: 16; bold: true } + anchors { + left: parent.left; leftMargin: 15 + verticalCenter: parent.verticalCenter + } + } + MouseArea { + anchors.fill: parent + onClicked: Qt.quit() + } + } + } ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" } } |