1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

add qqtApp

This commit is contained in:
tianduanrui 2018-01-19 21:45:53 +08:00
parent f9fbf02af0
commit 51f9fb1ddb
2 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,8 @@
#include <qqtinput.h>
#endif
QQtApplication* qqtApp = NULL;
QQtApplication::QQtApplication ( int& argc, char** argv ) :
QApplication ( argc, argv ),
bUPanAutoRun ( false )
@ -39,6 +41,8 @@ QQtApplication::QQtApplication ( int& argc, char** argv ) :
QSettings::setPath ( QSettings::IniFormat, QSettings::UserScope, CONFIG_PATH );
QSettings::setPath ( QSettings::IniFormat, QSettings::SystemScope, CONFIG_PATH );
qqtApp = this;
#ifdef __DARWIN__
QDir::setCurrent ( qApp->applicationDirPath() );
#endif
@ -215,4 +219,5 @@ void QQtApplication::setLanguage ( QString qmfile )
language->load ( qmfile );
pline() << "currentLanguage" << qmfile;
installTranslator ( language );
emit languageChanged();
}

View File

@ -28,7 +28,7 @@ public:
virtual int unInitInstance() { return 0; }
signals:
void languageChanged();
public slots:
void slotUPanAutoRun ( int status );
private:
@ -38,4 +38,6 @@ private:
QTranslator* language;
};
extern QQtApplication* qqtApp;
#endif // QQTAPPLICATION_H