資源簡(jiǎn)介
集成了多種qt頁(yè)面切換動(dòng)畫,絕對(duì)物超所值,使用5.2.1編譯,背景圖片請(qǐng)放到編譯目錄下,或者修改源碼中宏定義自己定義

代碼片段和文件信息
#include?“stack.h“
int?main(int?argc?char?*argv[])
{
????QApplication?app(argcargv);
#if?0
????QWidget?*w=new?QWidget;
????w->resize(240320);
????QPushButton?*button?=?new?QPushButton(“hicjiajia“w);
????QStateMachine?*machine?=?new?QStateMachine;?????//新建狀態(tài)機(jī)
????QState?*state1?=?new?QState(machine);?????//狀態(tài)
????state1->assignProperty(button“geometry“QRect(008030));????//綁定button的geomertry屬性
????machine->setInitialState(state1);?????//state1設(shè)為初始化狀態(tài)
????QState?*state2?=?new?QState(machine);
????state2->assignProperty(button“geometry“QRect(w->width()-30w->height()-803080));
????QFont?font?=?QFont(“Airl“?12);
????state2->assignProperty(button“font“font);?????//狀態(tài)2字體
????QPropertyAnimation?*ani=new?QPropertyAnimation(button“geometry“);
????ani->setDuration(2000);
????ani->setEasingCurve(QEasingCurve::OutBounce);???//動(dòng)畫效果—彈跳
????QSignalTransition?*transition1=state1->addTransition(buttonSIGNAL(clicked())state2);//動(dòng)畫觸發(fā)信號(hào)
????transition1->addAnimation(ani);
????QSignalTransition?*transition2=state2->addTransition(buttonSIGNAL(clicked())state1);
????transition2->addAnimation(ani);
????machine->start();?????//開啟狀態(tài)機(jī)
????w->show();
#endif
????Stack?w;
????w.show();
????return?app.exec();
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-04-11?15:14??animation\
?????文件???????16474??2016-04-08?15:07??animation\1.png
?????文件???????15560??2016-04-08?15:07??animation\2.png
?????文件???????11304??2016-04-08?13:36??animation\3.png
?????文件???????16474??2016-04-08?15:07??animation\4.png
?????文件???????15560??2016-04-08?15:07??animation\5.png
?????文件????????3840??2016-04-11?11:44??animation\6.png
?????文件?????????346??2016-04-07?08:20??animation\animation.pro
?????文件???????13410??2016-04-11?10:01??animation\animation.pro.user
?????文件???????13410??2016-04-08?10:12??animation\animation.pro.user.ad56fc1
?????文件????????1334??2016-04-11?09:15??animation\main.cpp
?????文件????????7281??2016-04-11?15:09??animation\stack.cpp
?????文件?????????704??2016-04-11?10:00??animation\stack.h
?????文件???????62286??2016-04-08?11:45??animation\zong.png
- 上一篇:電鍍?nèi)?昆侖觸屏+圖紙
- 下一篇:快速套用IEEE Word模板方法
評(píng)論
共有 條評(píng)論