运行环境为Window XP
实验内容与分析设计
利用QGraphicsItem与定时器实现动画效果:蝴蝶飞舞
实验步骤与调试过程
第一步:
Ctrl+N新建工程 其他项目---空的Qt项目 命名为butterfly
步骤二
Ctrl+N 新建选择 C++——C++源文件,命名为main.c
在mian.c中写入以下代码
#include <QApplication>
#include <QGraphicsScene>
#include <QGraphicsView>
#include "butterfly.h"
int main(int argc, char * argv[])
{
QApplication app(argc,argv);
QGraphicsScene