-
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
-
库存系统
库存管理系统是所有计算排序的详细信息和产品详细信息、 销售详细信息的过程,在此系统中保存的股票的详情。
- 2022-05-30 06:12:49下载
- 积分:1
-
- 2023-08-06 04:55:03下载
- 积分:1
-
显示进度,很好看的
显示进度,很好看的-show progress and a good read
- 2022-01-22 07:56:32下载
- 积分:1
-
在下拉列表中显示多列,软件类型: 国产软件 / 免费版 / 控件开发...
在下拉列表中显示多列,软件类型: 国产软件 / 免费版 / 控件开发 -In the drop-down list to display multiple columns
- 2022-12-26 07:10:04下载
- 积分:1
-
BCB programming skills
BCB编程技巧――文件切割机-BCB programming skills-- paper cutting machine
- 2023-03-31 20:50:03下载
- 积分:1
-
.写一个程序,能够读一行 string, 然后打出 最长的 那个 substring p (就是最长的小分句),并且那个小分句要求出现超过一次的。如果有超过1个...
.写一个程序,能够读一行 string, 然后打出 最长的 那个 substring p (就是最长的小分句),并且那个小分句要求出现超过一次的。如果有超过1个那样的substring, 只要打出那个字母顺序排后面的-. To write a program that can read his string, and then played the longest substring p (is the longest small clause), and request that a small clause appears more than once. If there is more than one kind of substring, as long as the shot was behind schedule in alphabetical order
- 2022-06-30 23:39:46下载
- 积分:1
-
快速查找数组中重复值:
实现原理:
(1)首先保证数组要排序。
(2)利用二分查找法,找到其中一个值,再找前驱节点和后继节点。...
快速查找数组中重复值:
实现原理:
(1)首先保证数组要排序。
(2)利用二分查找法,找到其中一个值,再找前驱节点和后继节点。-Fast search duplicate array values: the realization of the principle: (1) First of all, to ensure that the array to sort. (2) the use of binary search method to find one of the values, find pre-node and subsequent nodes.
- 2022-08-04 06:59:04下载
- 积分:1
-
这是可靠的入站文件的核心来源,看和处理所需的…
This the core source for reliable inbound file watching and processing needed for edi.-This is the core source for reliable inbound file watching and processing needed for edi.
- 2023-04-01 06:45:03下载
- 积分:1
-
通过WinCE键盘事件的变化
keyboard event change by wince
- 2022-02-11 15:47:11下载
- 积分:1