backend_qt5.py 787 B

12345678910111213141516171819202122232425262728
  1. from .. import backends
  2. backends._QT_FORCE_QT5_BINDING = True
  3. from .backend_qt import ( # noqa
  4. SPECIAL_KEYS,
  5. # Public API
  6. cursord, _create_qApp, _BackendQT, TimerQT, MainWindow, FigureCanvasQT,
  7. FigureManagerQT, ToolbarQt, NavigationToolbar2QT, SubplotToolQt,
  8. SaveFigureQt, ConfigureSubplotsQt, RubberbandQt,
  9. HelpQt, ToolCopyToClipboardQT,
  10. # internal re-exports
  11. FigureCanvasBase, FigureManagerBase, MouseButton, NavigationToolbar2,
  12. TimerBase, ToolContainerBase, figureoptions, Gcf
  13. )
  14. from . import backend_qt as _backend_qt # noqa
  15. @_BackendQT.export
  16. class _BackendQT5(_BackendQT):
  17. pass
  18. def __getattr__(name):
  19. if name == 'qApp':
  20. return _backend_qt.qApp
  21. raise AttributeError(f"module {__name__!r} has no attribute {name!r}")