[Interest] Quick Item visibility test / hit test... or synthesize press event

Federico Ferri federico.ferri.it at gmail.com
Tue Jun 21 20:54:03 CEST 2022

Is it possible to find what is the topmost visible item given a pixel

e.g. in this simplified example:

Rectangle {
    x: 20; y: 20; width: 20; height: 20; color: 'red';
    Rectangle {
        x: 5; y: 10; width: 5; height: 5; color: 'green';

it would be the red Rectangle for coordinate (21,21), the green Rectangle
for coordinate (26,32), and none for e.g. (15,15).

Alternatively, I'm happy to equip my Rectangles with a MouseArea
{anchors.fill:parent} each. Is it possible then to synthesize mouse press
events so to exploit Qt Quick's scenegraph/event processing magic?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220621/0d9d7add/attachment.htm>

More information about the Interest mailing list