PDA

View Full Version : How to Convert a QPainter object to QObject



srinivashv
13th January 2016, 07:06
Hi,

I am a new bee..

I need to do animation(Fix a point of rectangle and animate it to move 180 degree).
I am trying to do this by using QPropertyAnimation. this accepts a QObject where as rectangle i have drawn is using QPainter.
Please help....

Thanks and Regards
Srinivas

anda_skoa
13th January 2016, 11:03
The painter is just API for drawing, you animate the values you are using for drawing.

So the class that holds your data needs to be a QObject.

Cheers,
_