Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.3.0
-
-
95837745e4 (qt/qtdeclarative/dev) 95837745e4 (qt/tqtc-qtdeclarative/dev) 536d0c8bab (qt/qtdeclarative/6.3) 536d0c8bab (qt/tqtc-qtdeclarative/6.3) 20d53f3059 (qt/tqtc-qtdeclarative/6.2)
Description
Surprisingly, simple usage of Loader in declaration of an inline component is not possible and breaks QML.
First case - Loader as root
component MyComponent : Loader { sourceComponent: Item {} }
produces an error
Cannot assign object of type "Item" to property of type "QQmlComponent*" as the former is neither the same as the latter nor a sub-class of it.
Second case - some nested Loader
component MyComponent : Item { Loader { sourceComponent: Item {} } }
produces error
Component elements may not contain properties other than id
Attachments
Issue Links
- relates to
-
QTBUG-101655 [Reg 6.1 -> 6.2] Error creating inline component in Qt 6.2
-
- Closed
-
For Gerrit Dashboard: QTBUG-102719 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
407523,3 | QQmlTypeCompiler: Find implicit components for inline component roots | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
407955,3 | QQmlTypeCompiler: Find implicit components for inline component roots | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
407973,3 | QQmlTypeCompiler: Find implicit components for inline component roots | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |