myapp-classdef.cpp
来自「压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架>」· C++ 代码 · 共 16 行
CPP
16 行
class MyApplication : public QApplication { Q_OBJECT /* Required for Qt RTTI */ public: static MyApplication* instance(); QString imagesURL() const;// other members go here...};// ... in the implementation file:MyApplication* MyApplication::instance() { static MyApplication* inst = 0; if (inst == 0) { inst = qobject_cast<MyApplication*>(qApp); } return inst;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?