📄 main.cpp
字号:
/*********************************************************************** * * * linux版仿联众俄罗斯方块 v1.0 * 该软件在GPL(GNU通用公共许可证)下发布 * * Copyright (C) <codeky@126.com> * * This source code is licensed under the GNU General Public License * ************************************************************************/#include <qapplication.h>#include <stdlib.h>#include <unistd.h>#include "qmainwidget.h"char curPath[PATH_MAX];int main( int argc, char **argv ){ QApplication app( argc, argv ); int rt = readlink("/proc/self/exe", curPath, PATH_MAX); if(rt< 0||rt >=PATH_MAX){ rt =0; } curPath[rt] = '\0'; int pos = strlen(curPath)-1; while(pos>=0){ if(curPath[pos]=='/'){ break; } pos--; } curPath[pos+1]='\0'; QMainWidget w; app.setMainWidget( &w ); w.setCaption("linux-tetris -- Codekey@126.com"); w.show(); return app.exec();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -