From 6134937c48089499f05721f51c12f2828accf1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Wed, 9 Jun 2021 14:40:57 +0800 Subject: [PATCH] complete navbar --- doric-Qt/example/app/main.qml | 47 ++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/doric-Qt/example/app/main.qml b/doric-Qt/example/app/main.qml index fe2403ae..f1684bcf 100644 --- a/doric-Qt/example/app/main.qml +++ b/doric-Qt/example/app/main.qml @@ -14,10 +14,55 @@ ApplicationWindow { Rectangle { id: navbar - color: "red" visible: false Layout.fillWidth: true Layout.preferredHeight: 44 + + Text { + text: "Title" + font.pixelSize: 16 + anchors.centerIn: parent + } + + RowLayout { + anchors.verticalCenter: parent.verticalCenter + Rectangle { + Layout.preferredWidth: 10 + } + + Image { + Layout.preferredWidth: 24 + Layout.preferredHeight: 24 + id: name + source: "qrc:/doric/qml/doric_icon_back.png" + } + + Text { + text: "Left" + font.pixelSize: 16 + } + + MouseArea { + anchors.fill: parent + onClicked: { + stack.pop() + } + } + } + + RowLayout { + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + Text { + text: "Right" + font.pixelSize: 16 + } + + Rectangle { + Layout.preferredWidth: 10 + } + } } Rectangle {