首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > QT开发 >

求Qt的文字飘动代码,该如何处理

2012-04-10 
求Qt的文字飘动代码效果的一行 / 多行文字从 beg_pos 飘到 dest_pos,主要是这个飘。。。[解决办法]那什么是飘

求Qt的文字飘动代码
效果的一行 / 多行文字从 beg_pos 飘到 dest_pos,
主要是这个飘。。。

[解决办法]
那什么是飘。。。
[解决办法]

探讨

那什么是飘。。。

[解决办法]
是从一边飞到另一边么..
[解决办法]
就是文本控件的坐标移动?用QPropertyAnimation。

C/C++ code
 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飘过……
C/C++ code
import QtQuick 1.1Rectangle {    Text {        id: text        text: "Hello World"    }    PropertyAnimation {        target: text        property: "y"        from: 640        to: 0        running: true        duration: 3000    }}
[解决办法]
探讨

引用:

是从一边飞到另一边么..
是啊,就是从一个位置票到另外一个位置的动画,轨迹随意,急需代码啊。

[解决办法]
没事自己看demo吧:/usr/local/Trolltech/Qt-4.8.0/examples/declarative/text

热点排行