hotkeys: use Alt-m for amend on macOS
[git-cola.git] / qtpy / QtPrintSupport.py
blobd78ff4cc8c2d83ae31b29ff6575aa559f02f6d20
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 QtPrintSupport classes and functions."""
10 from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6
12 if PYQT5:
13 from PyQt5.QtPrintSupport import *
14 elif PYQT6:
15 from PyQt6.QtPrintSupport import *
17 QPageSetupDialog.exec_ = lambda self, *args, **kwargs: self.exec(
18 *args,
19 **kwargs,
21 QPrintDialog.exec_ = lambda self, *args, **kwargs: self.exec(
22 *args,
23 **kwargs,
25 QPrintPreviewWidget.print_ = lambda self, *args, **kwargs: self.print(
26 *args,
27 **kwargs,
29 elif PYSIDE6:
30 from PySide6.QtPrintSupport import *
32 # Map DeprecationWarning methods
33 QPageSetupDialog.exec_ = lambda self, *args, **kwargs: self.exec(
34 *args,
35 **kwargs,
37 QPrintDialog.exec_ = lambda self, *args, **kwargs: self.exec(
38 *args,
39 **kwargs,
41 elif PYSIDE2:
42 from PySide2.QtPrintSupport import *