📄 myapp-classdef.cpp
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -