Example #1
0
 def print_doc(self, doc):
     """Print the document."""
     if not printsupport:
         g.trace('Qt.printsupport not found.')
         return
     # pylint: disable=no-member
     dialog = printsupport.QPrintDialog()
     result = dialog.exec_()
     if result == DialogCode.Accepted:
         doc.print_(dialog.printer())
Example #2
0
 def print_doc(self, doc):
     """Print the document."""
     if not printsupport:
         g.trace('Qt.printsupport not found.')
         return
     dialog = printsupport.QPrintDialog()
     result = dialog.exec_()
     DialogCode = QtWidgets.QDialog.DialogCode if isQt6 else QtWidgets.QDialog
     if result == DialogCode.Accepted:
         doc.print_(dialog.printer())
Example #3
0
 def print_doc(self, doc):
     """Print the document."""
     dialog = printsupport.QPrintDialog()
     if dialog.exec_() == dialog.Accepted:
         doc.print_(dialog.printer())