1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
import Qt 4.7 Rectangle { width: 500 height: 500 color: 'red' property variant pythonObject: undefined Text { anchors.centerIn: parent text: 'click me' color: 'white' } Timer { interval: 100; running: true; onTriggered: { if (pythonObject != undefined) { pythonObject.blubb(42, 84) } } } }