mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-14 01:12:06 +08:00
Make ui independent of launch path (#31517)
* Make ui independent of launch path * comment
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QHash>
|
||||
@@ -114,6 +115,11 @@ void initApp(int argc, char *argv[], bool disable_hidpi) {
|
||||
|
||||
qputenv("QT_DBL_CLICK_DIST", QByteArray::number(150));
|
||||
|
||||
// ensure the current dir matches the exectuable's directory
|
||||
QApplication tmp(argc, argv);
|
||||
QString appDir = QCoreApplication::applicationDirPath();
|
||||
QDir::setCurrent(appDir);
|
||||
|
||||
setQtSurfaceFormat();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user