rust/cxx-qt pocs
This commit is contained in:
46
poc001/qml/main.qml
Normal file
46
poc001/qml/main.qml
Normal file
@@ -0,0 +1,46 @@
|
||||
// file: poc-qt/poc001/qml/main.qml
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import com.sasedev.hello
|
||||
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
width: 420
|
||||
height: 220
|
||||
title: "Rust + Qt Hello"
|
||||
|
||||
Greeter {
|
||||
id: greeter
|
||||
message: "Hello"
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 16
|
||||
spacing: 12
|
||||
|
||||
TextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Enter your name"
|
||||
text: greeter.name
|
||||
|
||||
onTextChanged: {
|
||||
greeter.name = text
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Say Hello"
|
||||
onClicked: {
|
||||
greeter.sayHello()
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: greeter.message
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user