Content of QTableWidget is cut while printing

116 Views Asked by At

I have a table (QTableWidget) with many rows and having scroll bar. This is my command to print this table.

QPrinter printer;
QPrintDialog printer_dialog(&printer);
if (printer_dialog.exec() == QDialog::Accepted) {
    QPainter painter(&printer);
    ui.mytable->render(&painter);
}

But only the first rows, which are shown, will be printed. The below part of the table (which we have to scroll the table down with scroll bar to see) is not printed. How can I print all the content of the table?

0

There are 0 best solutions below