Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
6.7, 6.8
-
None
Description
Repeater is supposed to create delegates and update its count property according to its model. But when a Repeater's parent is null, it won't create any delegates (reporting null for any itemAt query) but confusingly would still bump its counter.
This is illogical and does not make sense.
The documentation has a note that says, quoting:
Note: The number of items in the model as reported by count may differ from the number of created delegates if the Repeater is in the process of instantiating delegates or is incorrectly set up.
so it wouldn't hurt to at least clarify what the "incorrectly set up" can possibly mean.
Additional information
I found this behavior while writing a test case for my iterator adapter, and it was working fine in a bigger file loaded via a qml runtime, but silently and mysteriously returned an array of three null items in a standalone test component. Wasted lots of time trying to figure out why.