Reorder Application attributes before creating QCoreApplication to comply of framework expectations

This commit is contained in:
Julien Wadel 2020-03-31 16:35:48 +02:00
parent 9117d07bac
commit 1c36c2855e

View file

@ -42,14 +42,14 @@ AppController::AppController (int &argc, char *argv[]) {
Q_ASSERT(!mApp);
// Disable QML cache. Avoid malformed cache.
qputenv("QML_DISABLE_DISK_CACHE", "true");
QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
// Useful to share camera on Fullscreen (other context).
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
mApp = new App(argc, argv);
// ---------------------------------------------------------------------------
QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
// Useful to share camera on Fullscreen (other context).
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
// ---------------------------------------------------------------------------
// App creation.