A property alias on an object, like a Timer, does not work. See the following QML code for a testcase. import QtQuick 2.0 Rectangle { id: root width: 300 height: 300 property bool foo: true color: foo ? "blue" : "red" Item { id: myItem property alias timer: myTimer Timer { id: myTimer interval: 100 repeat: true running: false onTriggered: root.foo = !root.foo } } MouseArea { anchors.fill: parent onClicked: myItem.timer.start(); // broken //onClicked: myTimer.start(); // works } } Reproducible: Always
Git commit f930ec41d15973c03008bbca070e2c344f5c209b by Anton Kreuzkamp. Committed on 13/01/2014 at 13:33. Pushed by akreuzkamp into branch 'master'. Refacture context handling. This commit contains a complete rewrite of the context handling stuff in QmlWeb. Now the context is a handles as a stack of all component contexts above, to reflect how QML actually works. Moreover now the root QML Item won't be a child of the DOM-node the user gives, but it will take that node as its DOM-node, reducing the number of DOM-nodes used. Also now the root element won't be able to use "anchors.centerIn: parent" anymore, as it does not have a parent anymore (it doesn't have one in Qt as well). Instead now the implicitWidth and implicitHeight of the root element is set to reflect the size of the root DOM-node resp. the window size. This commit brings in a bug with e.g. states in conjunction with components. Look for the next commit for a fix. M +4 -2 src/parser.js M +127 -223 src/qtcore.js M +5 -7 test/testpad/easing.qml M +2 -1 test/testpad/repeater.qml M +4 -4 test/testpad/viewer.html http://commits.kde.org/qmlweb/f930ec41d15973c03008bbca070e2c344f5c209b