Qt4: Print a SQL table to PDF
问题 Qt has built-in PDF export support ( QPrinter::PdfFormat ). What's the best way to print an SQL table to a PDF file? (a table from a database loaded with QSqlDatabase and linked to a QTableView )... 回答1: You use QWidget::render. See the documentation about Printing Widgets. 来源: https://stackoverflow.com/questions/5939491/qt4-print-a-sql-table-to-pdf