[Interest] QtQuick Mouse operation to connect two objects

Andreas Cord-Landwehr phoenixx at uni-paderborn.de
Thu May 8 09:06:47 CEST 2014


Hi, I am looking for a proper way on how to apply a mouse press-release 
operation on two QtQuick objects. For simplicity, say I have two rectangles 
on the QtQuick scene. Now I want to press the mouse at one of them and 
release it at the other rectangle. By this, I want to listen to the onPressed 
signal of the first and to the onReleased signal of the second rectangle. 
(the idea behind: I create a connection between both objects)

My current approach was to use MouseArea items filling each rectangle. 
Yet, when pressing the mouse at the first rectangle and releasing at at the 
other, I only get pressed(MouseEvent) and released(MouseEvent) signals 
from the first rectangle, i.e. the rectangle where I started the press.

What would be a correct way to do this?

Cheers,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140508/e29614ea/attachment.html>


More information about the Interest mailing list