-
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
-
在Matlab环境下生成dll再在vb中调用
在Matlab环境下生成dll再在vb中调用-in Matlab environment generated dll again in vb Calling
- 2022-02-01 09:52:56下载
- 积分:1
-
一个聊天室程序C#
一个聊天室程序C#-a chat room procedures C#
- 2022-01-25 18:45:01下载
- 积分:1
-
益智游戏
联合国为例德代码魁贴片机评论 créer 联合国地图 éditeur avec HGE。
- 2022-05-24 09:20:13下载
- 积分:1
-
结构有限元分析源程序,用FORTRAN90编写,主要用于结构分析。...
结构有限元分析源程序,用FORTRAN90编写,主要用于结构分析。-Finite Element Analysis source with FORTRAN90 preparation, mainly for structural analysis.
- 2022-01-30 15:29:42下载
- 积分:1
-
这本书主要介绍支持高级计算机程序设计和算法分析的数学。...
这本书主要介绍支持高级计算机程序设计和算法分析的数学。-This book introduces the support of senior computer program design and analysis of mathematical algorithms.
- 2022-05-05 15:45:45下载
- 积分:1
-
CGI专家,开发CGI程序必备
CGI专家,开发CGI程序必备-CGI experts, the development of procedures required CGI
- 2022-01-26 03:08:25下载
- 积分:1
-
创建矢量图形编辑器,实现矢量图形控件。
Creating vector graphics editor, implementing vector graphics activex.
- 2022-02-05 07:59:17下载
- 积分:1
-
Screenshot of easy language module, very easy to use
Screenshot of easy language module, very easy to use
- 2022-03-03 23:22:02下载
- 积分:1
-
该程序控制一个带有图片的双极性电机。
This program control a bipolar motor with a PIC.
- 2022-09-22 12:25:03下载
- 积分:1