Make ui independent of launch path (#31517)

* Make ui independent of launch path

* comment
This commit is contained in:
Adeeb Shihadeh
2024-02-19 22:34:24 -08:00
committed by GitHub
parent 675eeb9d16
commit 5d4dc1dc2f
+6
View File
@@ -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();
}