dotherside/Nim/main.qml

42 lines
605 B
QML

import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
ApplicationWindow
{
width: 400
height: 300
Component.onCompleted: visible = true
function temp()
{
console.log("temp called")
}
ColumnLayout
{
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
}
}
}
}