setAutoFillBackground(true);//覆盖this->resize(480,270);this->setWindowIcon(QIcon("img/icon.jpg"));this->setWindowTitle("贪吃蛇");QPalettepalette;palette.setBrush(QPalette::Background,QBrush((QPixmap)"img/bjt.png"));this->setPalette(palette);//按扭区leftbtn=newQPushButton(this);leftbtn->setIcon((QIcon)"img/zuo.png");leftbtn->setIconSize(QSize(40,40));leftbtn->setGeometry(QRect(340,180,40,40));leftbtn->setFlat(true);rightbtn=newQPushButton(this);rightbtn->setIcon((QIcon)"img/you.png");rightbtn->setIconSize(QSize(40,40));rightbtn->setGeometry(QRect(430,180,40,40));rightbtn->setFlat(true-IMDN开发者社群-imdn.cn">
setAutoFillBackground(true);//覆盖this->resize(480,270);this->setWindowIcon(QIcon("img/icon.jpg"));this->setWindowTitle("贪吃蛇");QPalettepalette;palette.setBrush(QPalette::Background,QBrush((QPixmap)"img/bjt.png"));this->setPalette(palette);//按扭区leftbtn=newQPushButton(this);leftbtn->setIcon((QIcon)"img/zuo.png");leftbtn->setIconSize(QSize(40,40));leftbtn->setGeometry(QRect(340,180,40,40));leftbtn->setFlat(true);rightbtn=newQPushButton(this);rightbtn->setIcon((QIcon)"img/you.png");rightbtn->setIconSize(QSize(40,40));rightbtn->setGeometry(QRect(430,180,40,40));rightbtn->setFlat(true - IMDN开发者社群-imdn.cn">
于 2022-03-21 发布
文件大小:730.86 kB
0 253
游戏通过按键控制
部分代码:
#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
下载说明:请别用迅雷下载,失败请重下,重下不扣分!
wince 串行端口通信
串行端口通信平台为 wince 6.0.It 可以发送 16 机制数据和从串行端口接收 16 机制数据。您可以在设置中选择特殊的串行端口。它可以接收日期或多个字符,然后将其显示在对话框中。我们还可以传送文件,通过串行端口向其他设施。我们可以通过串行端口,如机器人、 门和其他设备使用的程序控制等设备。所以它是一个非常有用和方便的程序,使用它的人来说。
2022-07-03 17:19:57下载
积分:1
高校员工payro
College Employee Payro-College Employee Payroll
2022-11-25 23:45:03下载
积分:1
调用会出现一个功能界面计算器,通过它你可以来计算一些加减乘除运算.
调用会出现一个功能界面计算器,通过它你可以来计算一些加减乘除运算.-There will be a function call interface calculator, which you can calculate a number of addition and subtraction to multiplication and division calculations.
2022-01-25 20:35:21下载
积分:1
medical billing in vb language
medical billing in vb language
2022-02-12 08:01:35下载
积分:1
using public Decrypt and Encrypt message.
just basic introduction
how to de...
using public Decrypt and Encrypt message.
just basic introduction
how to dencrypt and decrypt.
2022-02-07 13:45:41下载
积分:1
计算机网络与多媒体技术的飞速发 展,对传统远程通信领域产生了深远的影
响,越来越多的多媒体信息出现在Internet上,视频点播(Video on Deman...
计算机网络与多媒体技术的飞速发展,对传统远程通信领域产生了深远的影
响,越来越多的多媒体信息出现在Internet上,视频点播(Video on Demand,简
称VOD)也随之产生。
-
The rapid development of computer network and multimedia technology has great influnce on telecommunication. More and more multimedia information appears on the Internet,thus video on demand (for short VOD) also come into being.
VOD is an interactive multimedia information services form.The users are able to select video information on demand according to their need and interest and control the process.VOD enjoys a brigt future and has already become hot investigation in the field of computer network and multimedia technology
2022-09-18 09:05:03下载
积分:1
马赛克的实现,vc下的好例子。
马赛克的实现,vc下的好例子。-the realization of the vc good example.
2022-08-08 17:41:39下载
积分:1
一个可以获得本地主机名和IP地址的小程序!供大家参考!
一个可以获得本地主机名和IP地址的小程序!供大家参考!-a local host name and IP address of the small programs! For your reference!
2023-05-23 12:00:02下载
积分:1
设置文件关联的程序代码
设置文件关联的程序代码-document linked to the code
2022-05-29 14:40:39下载
积分:1
VB滚轮补丁的功能是VB程序中滚轮的设置方便应用
VB滚轮补丁的功能是VB程序中滚轮的设置方便应用-VB function wheel patch VB programs are set up to facilitate the application of wheel
2023-01-23 22:50:03下载
积分:1