-
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
-
difference by jeffery Archer
difference by jeffery Archer
- 2022-08-13 00:50:19下载
- 积分:1
-
设计一个集合类,用来处理整型数。并具有以下功能:
1.具有为集合增加元素的功能。
2.具有处理交集,并集功能,并用“+”表示并集,“*”表示交集。...
设计一个集合类,用来处理整型数。并具有以下功能:
1.具有为集合增加元素的功能。
2.具有处理交集,并集功能,并用“+”表示并集,“*”表示交集。
3.有用链表来存储集合的功能。
-To design a collection class to handle integer. And has the following features: 1. Has increased for the collection of functional elements. 2. Have to deal with intersection, and set functions, and "+" that they set, "*" that intersection. 3. A useful list of functions to store the collection.
- 2023-04-10 02:05:04下载
- 积分:1
-
聚类算法在数据挖掘。净氧自由基
clustering algorithm in .NET ofr data mining
- 2023-02-11 16:45:04下载
- 积分:1
-
Window数据, 压缩huffman算法
Window数据, 压缩huffman算法-windows data ,compress huffman arithmetic
- 2022-07-15 15:34:28下载
- 积分:1
-
基于 Java 和 Web 开发的信用贷款管理系统
该信贷系统结合JSP和MySQL数据库的运用,采用JAVA语言开发,JS、HTML5、CSS等辅助前端界面的设计,最终实现了基本的信用贷款业务功能需求。该信贷系统主要分为管理员、业务员、客户经理三种权限登录,管理员登录之后添加部门信息和员工信息,归属员工所属部门和添加员工权限。业务员完成贷款客户信息资料的录入、贷款申请、贷款发放、合同添加、贷款还款、逾期催收等功能。客户经理主要是对贷款申请资料的审核,实现分层审贷的效果,业务员只能对已通过审核的贷款客户发放贷款。
- 2022-07-23 07:00:12下载
- 积分:1
-
Visual C++学习的例子,可以直接运行,初学者可以了解MFC…
Visual C++的学习实例,可直接运行,初学者可了解Visual C++的MFC运行过程和MFC的结构等。包括COM、CWND、CFrameWnd、CView/CDocument结构-Visual C learning examples can be run directly, beginners can understand the MFC Visual C operating processes and the structure of MFC. Including COM, CWND, CFrameWnd, CView/CDocument structure etc.
- 2022-04-28 20:29:51下载
- 积分:1
-
一个计算加权平均成绩的实用小程序,适用于大学中经常需要用到的计算。...
一个计算加权平均成绩的实用小程序,适用于大学中经常需要用到的计算。-a calculation of the weighted average score of small practical procedures applicable to the university often need to use the calculation.
- 2023-05-19 16:30:03下载
- 积分:1
-
Outlook式样界面菜单和页面控制,非常有用,可以是尝试一下啊
Outlook式样界面菜单和页面控制,非常有用,可以是尝试一下啊-Outlook style interface menu and page control, very useful, it can be to try ah
- 2022-03-18 22:19:46下载
- 积分:1
-
本程序采用了中断法访问ZLG7289芯片,内容包括一个完整的程序,经调试运行无误,对于想用这个芯片来作你的键盘扫描非常不错。...
本程序采用了中断法访问ZLG7289芯片,内容包括一个完整的程序,经调试运行无误,对于想用这个芯片来作你的键盘扫描非常不错。-the adoption of the law interrupted visit ZLG7289 chips, which include a complete set of procedures, commissioning, operation and truthful, want to use this chip for scanning your keyboard is very good.
- 2022-02-14 03:18:47下载
- 积分:1