Qt 6.11 is out! See what's new in the release
blog
How to turn a QTableView to a pdf
General and Desktop
2
Posts
2
Posters
7.2k
Views
1
Watching
-
hi,
lets say i added QTableView named table
in the designer ,so how do i turn it to a pdf
i know that there is QPianter involved
but i just can't figure out how to do it -
You write code to paint the data from the model underlying the table view to a QPrinter set to output PDF. How you access the data and format it is entirely up to you. Alternatively you can print an image of the widget on screen (a very different thing to the data in the table).
"Printing with Qt (Qt4)":http://qt-project.org/doc/qt-4.8/printing.html
"Qt Print Support (Qt5)":http://qt-project.org/doc/qt-5.1/qtprintsupport/qtprintsupport-index.html