PDA

View Full Version : Repeat specific rows or columns on every printed page feature



sipahi
29th January 2013, 20:08
How can I implement Microsoft Office's "repeat specific rows or columns on every printed page (http://office.microsoft.com/en-001/excel-help/repeat-specific-rows-or-columns-on-every-printed-page-HA010243219.aspx)" feature in Qt?

MWagman
30th January 2013, 00:36
I think you might want to make yourself a blank page function and code it in, or build it and clone it.

Gonna have to do some of the dirty work yourself here.

sipahi
30th January 2013, 06:51
I created a html table and I can print out it without any trouble. But I want that header row of my table printed every single page. For example I have a table with three columns and my header is Name-Age-Location. I can print out this table but header is only in first page. I want every page has same header. I can use header feature for this. But this time my page has two separate tables. And widths of cells are different because my tables are different. So I need a function which do same work with "repeat specific rows or columns on every printed page" feature. I can print out a page or add header and footer but I have no idea how can I do that.
Sorry for my English.

Lykurg
30th January 2013, 06:56
There is - as it was said - no function for that. So you have to
calculate how many rows fit on one page (QFontMetrics)
determine the header
draw the table yourself using the basic QPainter functions

sipahi
31st January 2013, 10:02
thank you @lykurg