ignore opengl import failure for people running from source

This commit is contained in:
Kovid Goyal 2022-08-10 21:54:22 +05:30
parent 5790bbeb8f
commit 77d065578d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1078,8 +1078,12 @@ class Application(QApplication):
# enough PyQt
QApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts)
# this import is needed to have Qt call qt_registerDefaultPlatformBackingStoreOpenGLSupport
from qt.core import QOpenGLWidget
del QOpenGLWidget
try:
from qt.core import QOpenGLWidget
del QOpenGLWidget
except ImportError:
if not is_running_from_develop:
raise
if iswindows:
self.windows_app_uid = None
if windows_app_uid: