From 34256c16f8fb56693e54bc49459dece2dbbab949 Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Sat, 13 Jan 2018 16:03:40 +0000 Subject: [PATCH] QT: Only set if hasattr(QtCore.Qt, "AA_ShareOpenGLContexts") If the attribute does not exist (presumably in older versions of Qt), this change prevents the following error: AttributeError: type object 'Qt' has no attribute 'AA_ShareOpenGLContexts' --- gui/qt/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py index 4bfd0fe6..16d07948 100644 --- a/gui/qt/__init__.py +++ b/gui/qt/__init__.py @@ -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