aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/localstorage/localstorage/MyDelegate.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
committerLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
commit0e80d28aa5892d6bbb4d0017b1bc9a33489f4176 (patch)
tree0db2e10c8776d172bccaeaa7ee1fab3934b93073 /examples/quick/localstorage/localstorage/MyDelegate.qml
parented32558d6280cae40578f735fd326327d571d993 (diff)
parent16c81bb0d493af00bc376784bcb7e03a4a037b04 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
Diffstat (limited to 'examples/quick/localstorage/localstorage/MyDelegate.qml')
-rw-r--r--examples/quick/localstorage/localstorage/MyDelegate.qml74
1 files changed, 74 insertions, 0 deletions
diff --git a/examples/quick/localstorage/localstorage/MyDelegate.qml b/examples/quick/localstorage/localstorage/MyDelegate.qml
new file mode 100644
index 0000000000..9a4ac1cc46
--- /dev/null
+++ b/examples/quick/localstorage/localstorage/MyDelegate.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.LocalStorage 2.0
+import QtQuick.Layouts 1.1
+import "Database.js" as JS
+
+Item {
+ width: parent.width
+ height: rDate.implicitHeight
+
+ Rectangle {
+ id: baseRec
+ anchors.fill: parent
+ opacity: 0.8
+ color: index % 2 ? "lightgrey" : "grey"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: listView.currentIndex = index
+ }
+ GridLayout {
+ anchors.fill:parent
+ columns: 3
+
+ Text {
+ id: rDate
+ text: date
+ font.pixelSize: 22
+ Layout.preferredWidth: parent.width / 4
+ color: "black"
+ }
+ Text {
+ id: rDesc
+ text: trip_desc
+ Layout.fillWidth: true
+ font.pixelSize: 22
+ color: "black"
+ }
+ Text {
+ id: rDistance
+ text: distance
+ font.pixelSize: 22
+ Layout.alignment: Qt.AlignRight
+ color: "black"
+ }
+ }
+ }
+}