Hi,

Am 21.08.23 um 16:49 schrieb Nils Jeisecke via Interest:
            clickedItem = layout.childAt(mouse.x, mouse.y);
             if (clickedItem) {
                 const index = clickedItem.index;
                 console.log("clicked", clickedItem, "index", index)
             }

 you could use

 const index = (clickedItem as Foo).index;

Unfortunately there is BUG#116264 which prevents inline components to be used that way but hopefully will be fixed in one of the next Qt-Versions.

It would work if you put the Foo component into a Foo.qml file.

Regards,
Heiko
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to