rqml/res/example.qml

65 lines
1.4 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:30:07 +00:00
HelloTwitter {
2020-07-04 21:58:15 +00:00
}
2020-07-05 23:23:22 +00:00
2020-07-06 22:47:08 +00:00
HelloTwitter {
2020-07-04 21:58:15 +00:00
}
2020-07-06 22:47:08 +00:00
2020-07-04 21:58:15 +00:00
Rectangle {
2020-07-06 22:47:08 +00:00
color: "#8c63a4"
2020-07-04 21:58:15 +00:00
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 {
2020-07-06 22:47:08 +00:00
color: "#634B72"
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 {
2020-07-06 22:47:08 +00:00
color: "#6F4985"
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 {
2020-07-06 22:47:08 +00:00
color: "#F3F0F4"
2020-07-04 21:58:15 +00:00
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 {
2020-07-06 22:47:08 +00:00
color: "#b29dbe"
2020-07-04 21:58:15 +00:00
Text {
anchors.centerIn: parent
text: "Hello, World!"
}
}
2020-07-04 18:35:37 +00:00
}
}