-
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
-
jsp主页管理系统
jsp主页管理系统-jsp Home Management System
- 2022-03-09 09:38:45下载
- 积分:1
-
i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 use the latest d...
i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 最新的WINCE6.0 BSP使用说明文档-i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 use the latest documentation WINCE6.0 BSP
- 2023-07-15 07:25:04下载
- 积分:1
-
c#生成条形码的代码演示,可以学习一下。
c#生成条形码的代码演示,可以学习一下。-c# generate bar code code demo, you can learn.
- 2022-06-02 23:02:33下载
- 积分:1
-
一个自己改写的串口通信程序,采用了多线程收发的效率较高,并可以实时绘图,源码有注释...
一个自己改写的串口通信程序,采用了多线程收发的效率较高,并可以实时绘图,源码有注释-write in a serial communication procedure, the use of multi-threading TX higher the efficiency, and real-time graphics, a source Notes
- 2022-03-11 04:13:15下载
- 积分:1
-
顯示Good morning!!的c++練習
顯示Good morning!!的c++練習顯示Good morning!!的c++練習
顯示Good morning!!的c++練習顯示Good morning!!的c++練習
顯示Good morning!!的c++練習顯示Good morning!!的c++練習
- 2022-11-29 07:00:03下载
- 积分:1
-
读文件STL。帮助进口固体进入程序
Read file STL.Help import solid into program
- 2022-01-26 01:39:25下载
- 积分:1
-
从底层开发的一个聊天程序
从底层开发的一个聊天程序-development from the bottom of a chat program
- 2022-09-16 19:20:05下载
- 积分:1
-
主要介绍在SuperMap IS .NET的使用和开发过程中需要了解和掌握的一些专题内容,包括许可配置信息、数字水印功能、智能集群缓存...
主要介绍在SuperMap IS .NET的使用和开发过程中需要了解和掌握的一些专题内容,包括许可配置信息、数字水印功能、智能集群缓存-Mainly describes the SuperMap IS. NET s use and development process need to understand and master a number of topics, including the license configuration information, digital watermarking capabilities, intelligent clustered cache
- 2022-11-10 16:15:03下载
- 积分:1
-
这是《Windows核心编程》所对应的程序源码,希望对有需要的朋友有所帮助...
这是《Windows核心编程》所对应的程序源码,希望对有需要的朋友有所帮助-This is the "core Windows programming" by the corresponding procedures source, and I hope to have a friend in need of some help
- 2022-12-25 11:30:03下载
- 积分:1