Skip to content

Commit

Permalink
Set up an OpenGL Context to be shared between threads beforehand
Browse files Browse the repository at this point in the history
Allows for plugins that depend on Qt WebEngine module.
  • Loading branch information
denchat committed Feb 10, 2020
1 parent 9cdf76a commit 249c75b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/main.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 249c75b

Please sign in to comment.