开发者

How can I paint a number of animated bubbles ? (Qt4.6)

开发者 https://www.devze.com 2023-03-30 03:58 出处:网络
Recentl开发者_开发技巧y in trouble, I hope you will help me . I created three buttons in a widget ,I use the QPropertyAnimation class to achieve the position of the three buttons move .

Recentl开发者_开发技巧y in trouble, I hope you will help me . I created three buttons in a widget ,I use the QPropertyAnimation class to achieve the position of the three buttons move .

such as this example:

QPushButton button("Animated Button");
 button.show();

 QPropertyAnimation animation(&button, "geometry");
 animation.setDuration(10000);

 animation.setKeyValueAt(0, QRect(0, 0, 100, 30));
 animation.setKeyValueAt(0.8, QRect(250, 250, 100, 30));
 animation.setKeyValueAt(1, QRect(0, 0, 100, 30));

 animation.start();

I want to paint a number of animated bubbles around these buttons when they are moving. There is no OpenGL and qml . Paint bubbles in paintEvent() or any other good idea ? I am concerned about the running speed and effect in ARM 9 board ...

Thanks.


There is no better solution. I can also write a more animation.

0

精彩评论

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