Merge pull request #3710 from nothingmuch/conditionally_share_opengl_contexts

QT: Only set "AA_ShareOpenGLContexts" if available
This commit is contained in:
ghost43 2018-01-13 21:38:31 +01:00 committed by GitHub
commit 7b4b6b8f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ class ElectrumGui:
#network.add_jobs([DebugMem([Abstract_Wallet, SPV, Synchronizer,
# ElectrumWindow], interval=5)])
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
if hasattr(QtCore.Qt, "AA_ShareOpenGLContexts"):
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
self.config = config
self.daemon = daemon
self.plugins = plugins