Skip to content

Commit

Permalink
Add print_ to PyQt6 classes which have print
Browse files Browse the repository at this point in the history
  • Loading branch information
kumattau committed Oct 21, 2021
1 parent fbddae3 commit 4d30014
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions qtpy/QtGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from PyQt6.QtGui import *
QDrag.exec_ = QDrag.exec
QGuiApplication.exec_ = QGuiApplication.exec
QTextDocument.print_ = QTextDocument.print
elif PYQT5:
from PyQt5.QtGui import *
elif PYSIDE2:
Expand Down
1 change: 1 addition & 0 deletions qtpy/QtPrintSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from PyQt6.QtPrintSupport import *
QPageSetupDialog.exec_ = QPageSetupDialog.exec
QPrintDialog.exec_ = QPrintDialog.exec
QPrintPreviewWidget.print_ = QPrintPreviewWidget.print
elif PYSIDE6:
from PySide6.QtPrintSupport import *
elif PYSIDE2:
Expand Down
2 changes: 2 additions & 0 deletions qtpy/QtWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
QApplication.exec_ = QApplication.exec
QDialog.exec_ = QDialog.exec
QMenu.exec_ = QMenu.exec
QTextEdit.print_ = QTextEdit.print
QPlainTextEdit.print_ = QPlainTextEdit.print
elif PYQT5:
from PyQt5.QtWidgets import *
elif PYSIDE6:
Expand Down

0 comments on commit 4d30014

Please sign in to comment.