Import PySide2 ImportErrors raised within this function are non-recoverable
()
| 243 | return QtCore, QtGui, QtSvg, QT_API_PYSIDE |
| 244 | |
| 245 | def import_pyside2(): |
| 246 | """ |
| 247 | Import PySide2 |
| 248 | |
| 249 | ImportErrors raised within this function are non-recoverable |
| 250 | """ |
| 251 | from PySide2 import QtGui, QtCore, QtSvg, QtWidgets, QtPrintSupport |
| 252 | |
| 253 | # Join QtGui and QtWidgets for Qt4 compatibility. |
| 254 | QtGuiCompat = types.ModuleType('QtGuiCompat') |
| 255 | QtGuiCompat.__dict__.update(QtGui.__dict__) |
| 256 | QtGuiCompat.__dict__.update(QtWidgets.__dict__) |
| 257 | QtGuiCompat.__dict__.update(QtPrintSupport.__dict__) |
| 258 | |
| 259 | return QtCore, QtGuiCompat, QtSvg, QT_API_PYSIDE2 |
| 260 | |
| 261 | |
| 262 | def load_qt(api_options): |