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() |
115 |
129 |
116 e5App = QCoreApplication.instance |
130 e5App = QCoreApplication.instance |