parent
3a88b70eca
commit
0877092cea
@ -28,6 +28,12 @@ Changed
|
|||||||
- When using QtWebEngine, the underlying Chromium version is now shown in the
|
- When using QtWebEngine, the underlying Chromium version is now shown in the
|
||||||
version info.
|
version info.
|
||||||
|
|
||||||
|
Fixed
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
- Added a workaround for a black screen with QtWebEngine with some setups
|
||||||
|
(requires PyOpenGL to be installed)
|
||||||
|
|
||||||
v0.10.1
|
v0.10.1
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ Module attributes:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
# pylint: disable=no-name-in-module,import-error,useless-suppression
|
# pylint: disable=no-name-in-module,import-error,useless-suppression
|
||||||
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
|
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
|
||||||
@ -33,7 +34,7 @@ from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
|
|||||||
|
|
||||||
from qutebrowser.browser import shared
|
from qutebrowser.browser import shared
|
||||||
from qutebrowser.config import config, websettings
|
from qutebrowser.config import config, websettings
|
||||||
from qutebrowser.utils import objreg, utils, standarddir, javascript
|
from qutebrowser.utils import objreg, utils, standarddir, javascript, log
|
||||||
|
|
||||||
|
|
||||||
class Attribute(websettings.Attribute):
|
class Attribute(websettings.Attribute):
|
||||||
@ -159,6 +160,18 @@ def init(args):
|
|||||||
if args.enable_webengine_inspector:
|
if args.enable_webengine_inspector:
|
||||||
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port())
|
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port())
|
||||||
|
|
||||||
|
# Workaround for a black screen with some setups
|
||||||
|
# https://github.com/spyder-ide/spyder/issues/3226
|
||||||
|
if not os.environ.get('QUTE_NO_OPENGL_WORKAROUND'):
|
||||||
|
# Hide "No OpenGL_accelerate module loaded: ..." message
|
||||||
|
logging.getLogger('OpenGL.acceleratesupport').propagate = False
|
||||||
|
try:
|
||||||
|
from OpenGL import GL
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
log.misc.debug("Imported PyOpenGL as workaround")
|
||||||
|
|
||||||
profile = QWebEngineProfile.defaultProfile()
|
profile = QWebEngineProfile.defaultProfile()
|
||||||
_init_profile(profile)
|
_init_profile(profile)
|
||||||
_init_stylesheet(profile)
|
_init_stylesheet(profile)
|
||||||
|
Loading…
Reference in New Issue
Block a user