Hi,

I want the user to connect a Line[1] between two Rectangle elements. I want
the user to be able to press and hold the RightButton button on the source
rectangle and drag the line to the destination rectangle. When the mouse
button is release on top of the other component the line must connect the 2
rectangles.

I have 3 questions:
1. I want the line to be created when the user right clicks on Rect1 and
while the mouse is dragged I want the end-point of the line to be anchored
to the current mouse point. Can this be done, if yes, how? (To see the line
as the user drags the mouse while pressed in)
2. How can I detect, when the mouse button was released, if it was on top of
another Rectangle?
3. Can I detect if the mouse is hovered over another Rectangle while the
mouse button is pressed in (for instance to highlight the destination when
hovered over)?

Some background:
-> There are an arbitrary number of Rectangles that can be connected in any
way.
-> The Rectangles are created on the canvas when a user clicks on an empty
space on the canvas.
-> This is my first QML Project...

Using:
Windows XP, Linux Ubuntu
Qt 4.7.2 (MinGW)
Creator 2.1.0

Sources:
[1]
http://wiki.forum.nokia.com/index.php/CS001627_-_Creating_a_custom_QML_element_with_Qt
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to