开发者

qt- how to move a picture in a slow motion

I am trying to move a picture slowly from one position to another in QGraphicsScene. So I tried to use sleep, after that much o开发者_如何学Cf milli seconds I tried "setPos". But is not doing as I thought. Some body please help me


sleep() is never what you want in an UI thread, as it blocks everything. Have a look at QGraphicsItemAnimation (setPosAt()) and QTimeLine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜