Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.1
-
None
Description
// Bar.qml:
import QtQuick 1.0
Item {
property Text theText: myText
Text
}
// Foo.qml:
import QtQuick 1.0
Item {
width: 800
height: 600
Bar
}
// The warning:
file:///C:/cygwin/home/ryan/foo/Foo.qml:7: Cannot set properties on theText as it is null
theText.text: "fixed"
I would expect that Bar.theText would work automatically. However, I guess that all properties are processed before the rest of the code. In this situation, I would suggest that the declaration of theText provide a compiler warning. Also, please update the documentation (qml-extending-types.html#supported-property-types).