How to move an object in a specified path…
how can i move an object(may be a dotted point) on a line.
I have seen the colliding mice example,but could not understand the code.
Suppose i have
QLine *line= new QLine(p1,p2); //where p1 and p2 are QPoint objects.
Now is there any way to move my object on that line?..If yes how?
Thanking you in advance…
You have to use QPropertyAnimation class somehow like this snippet:
where p1 and p2 is your points and w and h are the width and the height of the object you plan to move.