Skip to content
Permalink
Browse files

Set up an OpenGL Context to be shared between threads beforehand

Allows for plugins that depend on Qt WebEngine module.
  • Loading branch information
denchat committed Feb 10, 2020
1 parent 9cdf76a commit 249c75b9934cf71ecbe6319093ecdca45045c9e5
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/app/main.cpp
@@ -884,6 +884,15 @@ int main( int argc, char *argv[] )
QCoreApplication::setAttribute( Qt::AA_DisableWindowContextHelpButton, true );
#endif

// Set up an OpenGL Context to be shared between threads beforehand
// for plugins that depend on Qt WebEngine module.
// As suggested by Qt documentation at:
// - https://doc.qt.io/qt-5/qtwebengine.html
// - https://code.qt.io/cgit/qt/qtwebengine.git/plain/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
#if defined(QT_OS_WIN) && !defined(QT_NO_OPENGL) && (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) )
QCoreApplication::setAttribute( Qt::AA_ShareOpenGLContexts, true );
#endif

// Set up the QgsSettings Global Settings:
// - use the path specified with --globalsettingsfile path,
// - use the environment if not found

0 comments on commit 249c75b

Please sign in to comment.
You can’t perform that action at this time.