aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-08-19 11:12:20 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-01-23 10:38:14 +0100
commit87e7203532d69e0aaa0898a972d1d90fa589d519 (patch)
tree73f537a170597a002c5cfeb07ffa91d3ef6cf1a0 /examples
parentbe7e33e5dd59c0b8c077cdcb7849af3907455afc (diff)
Use required properties to fix some more qmllint warnings
Change-Id: I4489bd55e8777b7bf591c41a21e2b6dfdf9ea996 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/shared/LauncherList.qml1
-rw-r--r--examples/quick/shared/SimpleLauncherDelegate.qml7
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml
index 9859b5b635..f6001cc681 100644
--- a/examples/quick/shared/LauncherList.qml
+++ b/examples/quick/shared/LauncherList.qml
@@ -75,6 +75,7 @@ Rectangle {
id: launcherList
clip: true
delegate: SimpleLauncherDelegate{
+ required property url url
onClicked: root.showExample(url)
}
model: ListModel {id:myModel}
diff --git a/examples/quick/shared/SimpleLauncherDelegate.qml b/examples/quick/shared/SimpleLauncherDelegate.qml
index 7f07dea52a..097954cb89 100644
--- a/examples/quick/shared/SimpleLauncherDelegate.qml
+++ b/examples/quick/shared/SimpleLauncherDelegate.qml
@@ -51,6 +51,9 @@ import QtQuick 2.12
Rectangle {
id: container
+ required property string name
+ required property string description
+
property Item exampleItem
width: ListView.view.width
height: button.implicitHeight + 22
@@ -110,7 +113,7 @@ Rectangle {
anchors.leftMargin: 10
anchors.right: parent.right
anchors.rightMargin: 10
- text: name
+ text: container.name
color: "black"
font.pixelSize: 22
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@@ -122,7 +125,7 @@ Rectangle {
id: buttonLabel2
anchors.left: parent.left
anchors.leftMargin: 10
- text: description
+ text: container.description
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
color: "#666"
font.pixelSize: 12