37 lines
549 B
QML
Raw Normal View History

2014-12-01 21:02:33 +01:00
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
2014-12-01 21:02:33 +01:00
import QtQuick.Window 2.1
ApplicationWindow
{
width: 400
height: 300
Component.onCompleted: visible = true
ColumnLayout
2014-12-01 21:02:33 +01:00
{
anchors.fill: parent
Label
{
text: "Current name is:" + myQObject.name
}
TextField
{
id: textField
}
Button
{
text: "Change Name"
onClicked: {
console.log("QML:", textField.text)
myQObject.name = textField.text
}
}
2014-12-01 21:02:33 +01:00
}
}