我如何画一些动画泡泡?(Qt4.6)



最近遇到麻烦,希望你能帮助我。我在一个小部件中创建了三个按钮,我使用QPropertyAnimation类来实现三个按钮的位置移动。

,例如:

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();

我想在这些按钮移动时在它们周围画一些动画气泡。没有OpenGL和qml。在paintEvent()中绘制气泡或任何其他好主意?我很担心ARM 9板的运行速度和效果…

谢谢。

没有更好的解决办法了。我还可以写更多的动画

最新更新