E5Gui/E5Application.py

changeset 2084
d3f083dd0222
parent 2077
68a34718a0ce
child 2302
f29e9405c851
equal deleted inserted replaced
2083:3005ae4463aa 2084:d3f083dd0222
110 """ 110 """
111 if name in self.__pluginObjectRegistry: 111 if name in self.__pluginObjectRegistry:
112 return self.__pluginObjectRegistry[name][1] 112 return self.__pluginObjectRegistry[name][1]
113 else: 113 else:
114 raise KeyError('Pluginobject "{0}" is not registered.'.format(name)) 114 raise KeyError('Pluginobject "{0}" is not registered.'.format(name))
115
116 @staticmethod
117 def palette():
118 """
119 Static method to get compatibility between Qt4 QApplication and
120 Qt5 QGuiApplication.
121
122 @return reference to the global palette (QPalette)
123 """
124 try:
125 from PyQt4.QtGui import QGuiApplication
126 return QGuiApplication.palette()
127 except ImportError:
128 return QApplication.palette()
129 115
130 e5App = QCoreApplication.instance 116 e5App = QCoreApplication.instance

eric ide

mercurial