开发者

How to print QTableWidget on printer?

开发者 https://www.devze.com 2022-12-23 01:13 出处:网络
I have big size QTableWidget. I want to print it including headers, but QTableWidget doesn\'t have print() method. How can I impl开发者_运维技巧ement it?The information you want is provided in the Pri

I have big size QTableWidget. I want to print it including headers, but QTableWidget doesn't have print() method. How can I impl开发者_运维技巧ement it?


The information you want is provided in the Printing with Qt documentation page. In particular, pay attention to the Painting onto a Page section.


You can create a table with HTML and by using QTextDocument's setHtml() method you can set the tables to document then you can use the print() function of document for a continuous print with page numbers.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号