aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/keyinteraction/ListViewDelegate.qml
diff options
context:
space:
mode:
authorBumjoon Park <bumjoon.park@qt.io>2023-03-23 17:11:12 +0900
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-27 10:34:58 +0000
commit3238e18d6b0dc45d2e765fb0b93da5cbf3f396ec (patch)
treee9ea5df2ce1bf5bfa6177a081bf6423069a70013 /examples/quick/keyinteraction/ListViewDelegate.qml
parent26e86ee9ea26c9031d51d17448b9035a27fa9208 (diff)
Keyinteraction example: Update by coding conventions from official docv6.5.06.5.0
- string are translated. - JS statements no longer end with semi-colon. - Fix qmllint warning. Change-Id: I83f2b702c9bb9f02f86728e2277297272cd75251 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 023849fce46d25edc41db7b7c9e275cb0de5c189) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/keyinteraction/ListViewDelegate.qml')
-rw-r--r--examples/quick/keyinteraction/ListViewDelegate.qml30
1 files changed, 24 insertions, 6 deletions
diff --git a/examples/quick/keyinteraction/ListViewDelegate.qml b/examples/quick/keyinteraction/ListViewDelegate.qml
index 4b2424f393..8ae43c8ab5 100644
--- a/examples/quick/keyinteraction/ListViewDelegate.qml
+++ b/examples/quick/keyinteraction/ListViewDelegate.qml
@@ -7,28 +7,42 @@ Item {
id: container
required property int index
- width: ListView.view.width; height: 60; anchors.leftMargin: 10; anchors.rightMargin: 10
+ width: ListView.view.width
+ height: 60
+ anchors.leftMargin: 10
+ anchors.rightMargin: 10
Rectangle {
id: content
- anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
+
+ anchors.centerIn: parent
+ width: container.width - 40
+ height: container.height - 10
color: "transparent"
antialiasing: true
radius: 10
- Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; antialiasing: true; radius: 8 }
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 3
+ color: "#91AA9D"
+ antialiasing: true
+ radius: 8
+ }
}
Text {
id: label
+
anchors.centerIn: content
- text: "List element " + (container.index + 1)
+ text: qsTr("List element ") + (container.index + 1)
color: "#193441"
font.pixelSize: 14
}
MouseArea {
id: mouseArea
+
anchors.fill: parent
hoverEnabled: true
@@ -39,7 +53,8 @@ Item {
}
states: State {
- name: "active"; when: container.activeFocus
+ name: "active"
+ when: container.activeFocus
PropertyChanges {
content {
color: "#FCFFF5"
@@ -50,6 +65,9 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
+ NumberAnimation {
+ properties: "scale"
+ duration: 100
+ }
}
}