Aug-05-2021, 08:22 PM
I created a print button for the QTableWidget where I display the db data, but after the dialog window that appears, I get an error. my code is as below :
AttributeError: 'PySide2.QtWidgets.QTableWidget' object has no attribute 'print_'
It takes a screenshot of the tablewidget when I use render() instead of "print_"
I tried to look for examples from external sources but only found published examples on QTableView. I need information on how to proceed
def PrintPrinter(self): printer = QPrinter(QPrinter.HighResolution) dialog = QPrintDialog(printer, self) if dialog.exec_() == QPrintDialog.Accepted: self.ui.table_PrinterData.print_(printer)if the result:
AttributeError: 'PySide2.QtWidgets.QTableWidget' object has no attribute 'print_'
It takes a screenshot of the tablewidget when I use render() instead of "print_"
I tried to look for examples from external sources but only found published examples on QTableView. I need information on how to proceed