Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.8.1
-
None
Description
<Issue>
Using parent in qml files lead to runtime errors as follows:
qrc:/qt/qml/QmlTC_parents_cannot_be_used/Main.qml:11:9: TypeError: Cannot read property 'height' of null qrc:/qt/qml/QmlTC_parents_cannot_be_used/Main.qml:10:9: TypeError: Cannot read property 'width' of null qrc:/qt/qml/QmlTC_parents_cannot_be_used/Main.qml:17:13: TypeError: Cannot read property 'height' of null qrc:/qt/qml/QmlTC_parents_cannot_be_used/Main.qml:16:13: TypeError: Cannot read property 'width' of null
These errors don't kill the app and even with the TypeErrors, the GUI appears to be that parent is actually working fine.
parent is frequently used in Qt Quick apps, so if these errors mean nothing, they shouldn't be output in the first place to avoid confusion.
In my opinion, since parent is used in most Qt Quick apps, these TypeErrors should not even be occuring and developers should be allowed to use parent in their QML files even with QMLTC.