Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
QQuickItem::childAt possible bug ??
I'm trying to find out which QML Item is visible at certain cordinate. so I have this...
but return "child" is an item that isn't even visible at the moment (its covered up completely).
So what's this doing if not giving the "first visible" child?
well its definitely a bug in 5.5.1. Looks like somehow the children list isn't being sorted correctly.. which is interesting because its being painted in the right order.... looks like a QQuickItem maintains two lists of children: childItems and sortedChildItems.
childAt just returns the first item in the childItems list that contains the referenced point. the routine is expecting that childItems is sorted correctly... when its never sorted... sortedChildItems is.
Dunno if this has been fixed in later releases....
Just to follow up and close this topic...
A bug report was filed to address the issue
You should provide a minimal compilable example with the bug report. That will allow the developer to more quickly analyse what's going on.