rqml/res/example.qml

68 lines
1.5 KiB
QML
Raw Normal View History

2020-07-04 21:58:15 +00:00
Grid {
rows: 2
columns: 2
2020-07-04 18:35:37 +00:00
2020-07-05 23:23:22 +00:00
RedRectangle {
null:null
2020-07-04 21:58:15 +00:00
}
2020-07-05 23:23:22 +00:00
2020-07-04 21:58:15 +00:00
Rectangle {
color: "blue"
Text {
anchors.centerIn: parent
text: "Hello, World!"
}
}
Rectangle {
color: "blue"
Text {
2020-07-05 01:38:13 +00:00
id: target
2020-07-04 21:58:15 +00:00
anchors.centerIn: parent
text: "Hello, World!"
}
}
Grid {
rows: 2
columns: 2
2020-07-04 18:35:37 +00:00
2020-07-04 21:58:15 +00:00
Rectangle {
color: "red"
2020-07-05 21:29:44 +00:00
TextField {
id: tf1
2020-07-04 21:58:15 +00:00
anchors.centerIn: parent
2020-07-05 21:29:44 +00:00
text: "Test"
onchange = [[
]]
2020-07-04 21:58:15 +00:00
}
}
Rectangle {
color: "blue"
2020-07-05 21:29:44 +00:00
Button {
2020-07-04 21:58:15 +00:00
anchors.centerIn: parent
text: "Hello, World!"
2020-07-05 21:29:44 +00:00
onclick = [[
print("Hello World!");
update_property("target", "text", get_property("tf1","text"));
]]
2020-07-04 21:58:15 +00:00
}
}
Rectangle {
color: "blue"
Button {
anchors.centerIn: parent
text: "Hello, World!"
onclick = [[
print("Hello World!");
2020-07-05 01:38:13 +00:00
update_property("target", "text", "123");
2020-07-04 21:58:15 +00:00
]]
}
}
Rectangle {
color: "red"
Text {
anchors.centerIn: parent
text: "Hello, World!"
}
}
2020-07-04 18:35:37 +00:00
}
}