Files
StarPilot/selfdrive/ui/qt/ui.cc
T
Adeeb Shihadeh 7ac52e2374 qt fixups (#20171)
* no outline

* disable on qcom for now

* fix qt 5.12.8

* cleanup drive stats

* widgets cleanup

* ssl test

* revert that

* disable by default

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ec8b21c261b28d62dd84c2a6fa28bef09f5c8ed0
2021-02-28 18:10:50 -08:00

27 lines
589 B
C++

#include <QApplication>
#include "window.hpp"
#include "qt_window.hpp"
int main(int argc, char *argv[]) {
QSurfaceFormat fmt;
#ifdef __APPLE__
fmt.setVersion(3, 2);
fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
fmt.setRenderableType(QSurfaceFormat::OpenGL);
#else
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
#endif
QSurfaceFormat::setDefaultFormat(fmt);
#ifdef QCOM
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
#endif
QApplication a(argc, argv);
MainWindow w;
setMainWindow(&w);
a.installEventFilter(&w);
return a.exec();
}