Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.3.0
-
None
-
Mac OS 10.9.2, Qt 5.3.0-x64-Android-IOS, QtQuick 2.2
Description
I used `Qt.createQmlObject()` as follow:
import QtQuick 2.2; Rectangle { id: root width: 300; height: 300 Row { id: itemContainer Component.onCompleted: { var newObject = Qt.createQmlObject('import QtQuick 2.2; Rectangle {color: "red"; width: 200; height: 200}', pages, ""); } Rectangle { width: 100; height: 50 color: "Yellow" } } }
This not works and I changed it as follow:
import QtQuick 2.2; Rectangle { id: root width: 300; height: 300 Row { id: itemContainer Rectangle { width: 100; height: 50 color: "Yellow" } Component.onCompleted: { var newObject = Qt.createQmlObject('import QtQuick 2.2; Rectangle {color: "red"; width: 200; height: 200}', pages, ""); } } }
and it WORKS, but not as expected! not as `Row` child. As you can see, executing `Qt.createQmlObject()` inside a `Row` element not causes to recalculation of some of essential estimations of `Row` element.