2014-12-01 21:02:33 +01:00
|
|
|
import QtQuick 2.2
|
|
|
|
import QtQuick.Controls 1.2
|
|
|
|
import QtQuick.Window 2.1
|
|
|
|
|
|
|
|
ApplicationWindow
|
|
|
|
{
|
|
|
|
width: 400
|
|
|
|
height: 300
|
2014-12-08 12:55:09 +01:00
|
|
|
Component.onCompleted: {
|
|
|
|
visible = true
|
2014-12-10 22:50:56 +01:00
|
|
|
myQObject.myVoidSlot()
|
|
|
|
myQObject.myIntSlot(10)
|
|
|
|
var result = myQObject.myIntSlot2(20)
|
|
|
|
console.log("QML: result ", result)
|
|
|
|
myQObject.intValueChanged.connect(temp)
|
|
|
|
}
|
|
|
|
|
|
|
|
function temp()
|
|
|
|
{
|
|
|
|
console.log("temp called")
|
2014-12-08 12:55:09 +01:00
|
|
|
}
|
2014-12-01 21:02:33 +01:00
|
|
|
|
|
|
|
Button
|
|
|
|
{
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Click Me"
|
2014-12-10 22:50:56 +01:00
|
|
|
onClicked: myQObject.myVoidSlot()
|
2014-12-01 21:02:33 +01:00
|
|
|
}
|
|
|
|
}
|