Make ui independent of launch path (#31517)

* Make ui independent of launch path

* comment
old-commit-hash: 5d4dc1dc2f
pull/32199/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 5b8eb7f9c7
commit 97b823efe6
  1. 6
      selfdrive/ui/qt/util.cc

@ -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();
}

Loading…
Cancel
Save