summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/printlayout.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 7c0894db5..1d34a0633 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -419,6 +419,13 @@ void PrintLayout::printTable()
for (i = 0; i < total; i++) {
if (i > 0)
printer->newPage();
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ (void)headingRowHeightD2;
+ QRegion region(0, pageIndexes.at(i) - 1,
+ table.width(),
+ pageIndexes.at(i + 1) - pageIndexes.at(i) + 1);
+ table.render(&painter, QPoint(0, 0), region);
+#else
QRegion region(0, pageIndexes.at(i) + headingRowHeightD2 - 1,
table.width(),
pageIndexes.at(i + 1) - (pageIndexes.at(i) + headingRowHeightD2) + 1);
@@ -429,6 +436,7 @@ void PrintLayout::printTable()
table.render(&picPainter, QPoint(0, 0), region);
picPainter.end();
painter.drawPicture(QPoint(0, headingRowHeightD2), pic);
+#endif
progress++;
emit signalProgress(done + (progress * 10) / total);
}