mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 00:44:34 +12:00
Share OpenGL contexts to make Qt WebEngine happy
This takes care of the following warning in our log file: Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication
This commit is contained in:
parent
0a0ffb6d54
commit
0ea4c0d174
|
@ -20,6 +20,10 @@ import logging
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
def prepare(arguments, tests=False):
|
def prepare(arguments, tests=False):
|
||||||
|
# Qt WebEngine demands this attribute be set _before_ we create our QApplication object.
|
||||||
|
QApplication.setAttribute(Qt.AA_ShareOpenGLContexts, True)
|
||||||
|
|
||||||
|
# Create the foundation that provides our Qt application with its event loop.
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
app.setOrganizationName("manuskript" + ("_tests" if tests else ""))
|
app.setOrganizationName("manuskript" + ("_tests" if tests else ""))
|
||||||
app.setOrganizationDomain("www.theologeek.ch")
|
app.setOrganizationDomain("www.theologeek.ch")
|
||||||
|
@ -160,7 +164,7 @@ def prepare(arguments, tests=False):
|
||||||
QIcon.setThemeSearchPaths(QIcon.themeSearchPaths() + [appPath("icons")])
|
QIcon.setThemeSearchPaths(QIcon.themeSearchPaths() + [appPath("icons")])
|
||||||
QIcon.setThemeName("NumixMsk")
|
QIcon.setThemeName("NumixMsk")
|
||||||
|
|
||||||
# Font siue
|
# Font size
|
||||||
if settings.contains("appFontSize"):
|
if settings.contains("appFontSize"):
|
||||||
f = qApp.font()
|
f = qApp.font()
|
||||||
f.setPointSize(settings.value("appFontSize", type=int))
|
f.setPointSize(settings.value("appFontSize", type=int))
|
||||||
|
|
Loading…
Reference in a new issue