diff options
Diffstat (limited to 'DemoApplication/pages/Page2.qml')
-rw-r--r-- | DemoApplication/pages/Page2.qml | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/DemoApplication/pages/Page2.qml b/DemoApplication/pages/Page2.qml index 9d5a796..40be56c 100644 --- a/DemoApplication/pages/Page2.qml +++ b/DemoApplication/pages/Page2.qml @@ -1,5 +1,6 @@ import QtQuick 2.9 import QtQuick.Controls 2.4 +import QtQuick.Layouts 1.3 import CursorNavigation 1.0 import controls 1.0 @@ -8,40 +9,34 @@ Item { width: parent.width height: parent.height - Item { - width: 580 - height: 450 - anchors.centerIn: parent - FocusScope { - id: focusScope - width: 198 - height: 359 - anchors.right: parent.right - anchors.top: parent.top - anchors.topMargin: 20 - + RowLayout { + anchors.fill: parent + spacing: 10 + Column { CNListView { id: listView - anchors.fill: parent + width: 198 + height: 359 + //anchors.right: parent.right + //anchors.top: parent.top + //anchors.topMargin: 20 spacing: 4 + clip: true model: ListModel { ListElement { name: "Grey" colorCode: "grey" } - ListElement { name: "Red" colorCode: "red" } - ListElement { name: "Blue" colorCode: "blue" } - ListElement { name: "Green" colorCode: "green" @@ -62,21 +57,34 @@ Item { name: "Black" colorCode: "black" } + ListElement { + name: "Aliceblue" + colorCode: "aliceblue" + } + ListElement { + name: "Blueviolet" + colorCode: "blueviolet" + } + ListElement { + name: "Coral" + colorCode: "coral" + } } } - } - CNButton { - id: button3 - anchors.top: focusScope.bottom - anchors.topMargin: 20 - anchors.right: parent.right - anchors.rightMargin: 60 - text: qsTr("Button") + CNButton { + anchors.horizontalCenter: parent.horizontalCenter + id: button3 + //anchors.top: listView.bottom + //anchors.topMargin: 20 + //anchors.right: parent.right + //anchors.rightMargin: 60 + text: qsTr("Button") + } } Column { - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 50 + //anchors.verticalCenter: parent.verticalCenter + //anchors.left: parent.left + //anchors.leftMargin: 50 spacing: 30 CNButton { text: qsTr("Button") @@ -90,5 +98,6 @@ Item { text: qsTr("Button") } } + } } |