-
QT编写的C++贪吃蛇小游戏
游戏通过按键控制
部分代码:
#include "gamewidget.h"
#define ROW 13
#define COL 16
#define UP 0
#define DOWN 1
#define LEFT 2
#define RIGHT 3
GameWidget::GameWidget(QWidget *parent)
:QWidget(parent)
{
this->setAutoFillBackground(true);//覆盖
this->resize(480,270);
this->setWindowIcon(QIcon("img/icon.jpg"));
this->setWindowTitle("贪吃蛇");
QPalette palette;
palette.setBrush(QPalette::Background,QBrush((QPixmap)"img/bjt.png"));
this->setPalette(palette);
//按扭区
leftbtn=new QPushButton(this);
leftbtn->setIcon((QIcon)"img/zuo.png");
leftbtn->setIconSize(QSize(40,40));
leftbtn->setGeometry(QRect(340,180,40,40));
leftbtn->setFlat(true);
rightbtn=new QPushButton(this);
rightbtn->setIcon((QIcon)"img/you.png");
rightbtn->setIconSize(QSize(40,40));
rightbtn->setGeometry(QRect(430,180,40,40));
rightbtn->setFlat(true
- 2022-03-21 19:09:00下载
- 积分:1
-
二维码制作解码工具QRcode
二维码制作解码工具QRcode,非常好的二维码制作解码工具,单程序操作,简单方便快速有效
- 2022-06-15 16:10:06下载
- 积分:1
-
mfc 制作的简单的 图形报表文档 英文版
mfc 制作的简单的 图形报表文档 英文版
-mfc graphics produced by a simple statement of the document in English
- 2023-04-14 17:05:04下载
- 积分:1
-
ART2000 DA AD板的dos系统测试程序,用于学习和开发ART2
ART2000 DA AD板的dos系统测试程序,用于学习和开发ART2-ART2000 DA AD board dos system testing procedures, for learning and development ART2000
- 2022-04-28 21:01:19下载
- 积分:1
-
基于CUDA的心脏四腔室跳动模拟程序,数据来源www.ices.utexas.edu/~jessica/medical_data/heart/Heart_Val...
基于CUDA的心脏四腔室跳动模拟程序,数据来源www.ices.utexas.edu/~jessica/medical_data/heart/Heart_Valve_new.htm-CUDA-based four-chamber heart beating simulation program, data sources www.ices.utexas.edu/ ~ jessica/medical_data/heart/Heart_Valve_new.htm
- 2022-04-11 20:51:25下载
- 积分:1
-
本人早期用c++写的动态哈夫曼编码,在vc2005上编译通过!
本人早期用c++写的动态哈夫曼编码,在vc2005上编译通过!-I spent the early c++ Write dynamic Huffman coding, compiled in vc2005 through!
- 2023-06-27 04:05:04下载
- 积分:1
-
NMEA0183开发库
开发语言:Visual C++,C++开发工具:Visual Studio功能描述:它是解析NMEA 0183的协议的开发库,使用该库,可以非常方便,快捷地将从COM口读取的gps定位器的数据进行解析,例如:解析出当前gps定位器中的经度,纬度,高度,速度,状态等信息。
- 2022-03-24 16:51:58下载
- 积分:1
-
Visual Basic控制MessageBox
Visual Basic控制MessageBox-Visual Basic Control MessageBox
- 2022-03-04 10:02:30下载
- 积分:1
-
recorded communications, the communications were added to delete statistics View...
通信录,实现通信录的添加删除浏览查找统计等功能。-recorded communications, the communications were added to delete statistics View search capabilities.
- 2022-01-27 19:37:22下载
- 积分:1
-
这是用VC++开发的交通灯的应用程序,可以模拟交通灯
这是用VC++开发的交通灯的应用程序,可以模拟交通灯-It is developed by using VC++ application traffic lights, traffic lights can be simulated
- 2022-02-12 00:46:59下载
- 积分:1