关于c++的程序请哪位高人告诉我是什么意思Main.cpp #include #include #include "mainw.h" int main(int argc, char *argv[]){ QApplication a(argc, argv); MainW w; QTranslator translator; translator.load( ":/image/image/mainc
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 05:21:44
关于c++的程序请哪位高人告诉我是什么意思Main.cpp #include #include #include "mainw.h" int main(int argc, char *argv[]){ QApplication a(argc, argv); MainW w; QTranslator translator; translator.load( ":/image/image/mainc
关于c++的程序请哪位高人告诉我是什么意思
Main.cpp
#include
#include
#include "mainw.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainW w;
QTranslator translator;
translator.load( ":/image/image/mainch.qm");
a.installTranslator( &translator );
w.show();
return a.exec();
}
mainw.h
namespace Ui {
class MainW;
}
class MainW : public QMainWindow,public Ui::MainW {
Q_OBJECT
public:
MainW(QWidget *parent = 0);
~MainW();
protected:
void changeEvent(QEvent *e);
void keyPressEvent(QKeyEvent *);
void paintEvent(QPaintEvent *);
protected slots:
void onTimeOut();
void gamePause();
void gameNew();
void setPlayer();
void setLevel();
void onHelpAction();
private:
Ui::MainW *ui;
QImage *image;
QImage *bakBox;
QImage *bak;
QTimer *timer;
Engine *engine;
bool isStart;
static const int NEXTPOS_X=206;
static const int NEXTPOS_Y=50;
static const int HEIGHT=20;
static const int WIDTH=10;
static const int IMAGESIZE=20;
};
跪求给位大神啊!
关于c++的程序请哪位高人告诉我是什么意思Main.cpp #include #include #include "mainw.h" int main(int argc, char *argv[]){ QApplication a(argc, argv); MainW w; QTranslator translator; translator.load( ":/image/image/mainc
你这是QT的程序,创建界面的.不过QT界面的创建自己能拖动实现.不用代码