From 90eecc6a5a4d586441280e312c9b43c5b0a252bc Mon Sep 17 00:00:00 2001 From: c-b51 <30778434+c-b51@users.noreply.github.com> Date: Fri, 20 Jan 2023 01:39:04 +0100 Subject: [PATCH] Create mainwindow.ui.qml --- chapter 5/QML_Cpp/mainwindow.ui.qml | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 chapter 5/QML_Cpp/mainwindow.ui.qml diff --git a/chapter 5/QML_Cpp/mainwindow.ui.qml b/chapter 5/QML_Cpp/mainwindow.ui.qml new file mode 100644 index 0000000..fb1f4d1 --- /dev/null +++ b/chapter 5/QML_Cpp/mainwindow.ui.qml @@ -0,0 +1,58 @@ +import QtQuick 2.4 + +Item { + + width: 1024 + height: 728 + + id: root + + property string messText: "Test" + property alias mouseArea: mouseArea + property alias rectangle: rectangle + property alias text: text + + anchors.fill: parent + + Rectangle { + + id: rectangle + + x: 412 + y: 40 + + width: 200 + height: 200 + + color: "#ffb508" + + objectName: "messageText" + + } + + Text { + + id: text + + x: 453 + y: 499 + + text: qsTr( messText ) + + font.pixelSize: 18 + + objectName: "messageText" + + } + + MouseArea { + + id: mouseArea + + anchors.fill: parent + + } + +} + +