widgets: guard against RuntimeError during application shutdown
[git-cola.git] / qtpy / QtPdfWidgets.py
blob1b0a2e11560d7ec6fee583f370e5b47ee5682f89
1 # -----------------------------------------------------------------------------
2 # Copyright © 2009- The Spyder Development Team
4 # Licensed under the terms of the MIT License
5 # (see LICENSE.txt for details)
6 # -----------------------------------------------------------------------------
8 """Provides QtPdfWidgets classes and functions."""
10 from . import (
11 PYQT5,
12 PYQT6,
13 PYSIDE2,
14 PYSIDE6,
15 QtBindingMissingModuleError,
18 if PYQT5:
19 raise QtBindingMissingModuleError(name='QtPdfWidgets')
20 elif PYQT6:
21 # Available with version >=6.4.0
22 from PyQt6.QtPdfWidgets import *
23 elif PYSIDE2:
24 raise QtBindingMissingModuleError(name='QtPdfWidgets')
25 elif PYSIDE6:
26 # Available with version >=6.4.0
27 from PySide6.QtPdfWidgets import *