⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pymain.cpp

📁 qconsole2 qt寫的一個console元件
💻 CPP
字号:
/***************************************************************************                          main.cpp  -  description                             -------------------    begin                : mar mar 8 2005    copyright            : (C) 2005 by houssem    email                : houssem@localhost ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#include <qapplication.h>#include <qmainwindow.h>#include "qpyconsole.h"/* Define the following to fix __ctype_* from GLIBC2.3 and upper   if not compiled using the same GLIBC *///#define FIX__CTYPE_#ifdef FIX__CTYPE_#include <ctype.h>__const unsigned short int *__ctype_b;__const __int32_t *__ctype_tolower;__const __int32_t *__ctype_toupper;void ctSetup(){  __ctype_b = *(__ctype_b_loc());  __ctype_toupper = *(__ctype_toupper_loc());  __ctype_tolower = *(__ctype_tolower_loc());}#endif//The main entryint main( int argc, char ** argv ){#ifdef FIX__CTYPE_    ctSetup();#endif    QApplication a( argc, argv );    //Create and show the main window    QMainWindow mw(0, "Application window");    mw.setMinimumSize(640, 480);    //Instantiate and set the focus to the QPyConsole    QPyConsole *console = QPyConsole::getInstance(&mw);    mw.setFocusProxy((QWidget*)console);    mw.setCentralWidget((QWidget*)console);    a.setMainWidget(&mw);    mw.show();                        return a.exec();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -