Skip to content

Create mainwindow.ui.qml #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions chapter 5/QML_Cpp/mainwindow.ui.qml
Original file line number Diff line number Diff line change
@@ -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

}

}