求Qt的文字飘动代码
效果的一行 / 多行文字从 beg_pos 飘到 dest_pos,
主要是这个飘。。。
[解决办法]
那什么是飘。。。
[解决办法]
QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry"); animation->setDuration(10000); animation->setStartValue(QRect(0, 0, 100, 30)); animation->setEndValue(QRect(250, 250, 100, 30)); animation->start();
[解决办法]
哈,QML飘过……
import QtQuick 1.1Rectangle { Text { id: text text: "Hello World" } PropertyAnimation { target: text property: "y" from: 640 to: 0 running: true duration: 3000 }}
[解决办法]