Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.3, 6.0.2
-
None
Description
Using a component with `required` properties inside a `Loader` and using a `Binding
{ ... }` results in:
```
Required property someProp was not initialized
```
There currently does not seem to be a declarative way to use such component inside a `Loader`. Considering how the `required` keyword can be used to make components re-usable, and the fact that `Loader` has use cases with no other alternatives, this limitation of `Loader` reduces the re-usability of such components. So for example if you are using a library that has been designed to be safe and re-usable using the `required` keyword (rightly so), you would not be able to use purely declarative QML and the `Loader` component.
An imperative alternative would be to use `setSource` in the `Loader`.
Attachments
Issue Links
- relates to
-
QTBUG-104764 Teach Loader (and friends) to load from module URI+typename
-
- Reported
-