QtPrintSupport.py 909 B

12345678910111213141516171819202122232425262728
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Copyright © 2009- The Spyder Development Team
  4. #
  5. # Licensed under the terms of the MIT License
  6. # (see LICENSE.txt for details)
  7. """
  8. Provides QtPrintSupport classes and functions.
  9. """
  10. from . import PYQT5, PYQT4,PYSIDE2, PYSIDE, PythonQtError
  11. if PYQT5:
  12. from PyQt5.QtPrintSupport import *
  13. elif PYSIDE2:
  14. from PySide2.QtPrintSupport import *
  15. elif PYQT4:
  16. from PyQt4.QtGui import (QAbstractPrintDialog, QPageSetupDialog,
  17. QPrintDialog, QPrintEngine, QPrintPreviewDialog,
  18. QPrintPreviewWidget, QPrinter, QPrinterInfo)
  19. elif PYSIDE:
  20. from PySide.QtGui import (QAbstractPrintDialog, QPageSetupDialog,
  21. QPrintDialog, QPrintEngine, QPrintPreviewDialog,
  22. QPrintPreviewWidget, QPrinter, QPrinterInfo)
  23. else:
  24. raise PythonQtError('No Qt bindings could be found')