mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
add qqtApp
This commit is contained in:
parent
f9fbf02af0
commit
51f9fb1ddb
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user