mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
ignore opengl import failure for people running from source
This commit is contained in:
parent
5790bbeb8f
commit
77d065578d
@ -1078,8 +1078,12 @@ class Application(QApplication):
|
|||||||
# enough PyQt
|
# enough PyQt
|
||||||
QApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts)
|
QApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts)
|
||||||
# this import is needed to have Qt call qt_registerDefaultPlatformBackingStoreOpenGLSupport
|
# this import is needed to have Qt call qt_registerDefaultPlatformBackingStoreOpenGLSupport
|
||||||
from qt.core import QOpenGLWidget
|
try:
|
||||||
del QOpenGLWidget
|
from qt.core import QOpenGLWidget
|
||||||
|
del QOpenGLWidget
|
||||||
|
except ImportError:
|
||||||
|
if not is_running_from_develop:
|
||||||
|
raise
|
||||||
if iswindows:
|
if iswindows:
|
||||||
self.windows_app_uid = None
|
self.windows_app_uid = None
|
||||||
if windows_app_uid:
|
if windows_app_uid:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user