Hi,
I need to draw a line between a widget and the current mousePosition.
Let's say I have 3 QPushButtons.. and when I click on one of them, I want to drag a red line with the mouse, starting at the Button - to "connect" it to something..
Normaly I would do this with a QGraphicsView and just paint a button inside of the View, but because of the architecture of our Software, that's not possible..
So, is there any way to just draw a line as Screen-Overlay or something? The Button and the Target for the line may not be on the same parent-widget.. could be even in two different windows.
An alternative way would be do do something like drag'n'drop: Drag the Button and drop it on the Target.. but therefore I'd like to have a visual representation of the button under the mouse cursor while dragging (like in Windows Explorer when dragging files).. is there any way to do this?
Thanks,
Aya


Reply With Quote


Bookmarks