set font size

This commit is contained in:
Martin Brodbeck 2018-08-08 09:30:48 +02:00
parent 6b0f31a0c2
commit 95a89e568c

View file

@ -68,6 +68,8 @@ void ReportDialog::onPrintReportButtonClicked()
unsigned int numPages = std::ceil(sellers.size() / ENTRIES_PER_PAGE);
painter.begin(&printer);
QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
fixedFont.setPointSize(12);
for (unsigned int i = 1; i <= numPages; ++i) {
if (i > 1)
@ -75,7 +77,7 @@ void ReportDialog::onPrintReportButtonClicked()
painter.setFont(QFont("Arial", 16, QFont::Bold));
painter.drawText(QRect(0, 0, width, height), Qt::AlignTop | Qt::AlignHCenter,
"Auswertung Kindersachenmarkt");
painter.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
painter.setFont(fixedFont);
QString content;
content += QString("%1 %2 %3 %4 %5 %6 %7")
.arg("Nr.", -3)
@ -110,7 +112,7 @@ void ReportDialog::onPrintReportButtonClicked()
painter.setFont(QFont("Arial", 16, QFont::Bold));
painter.drawText(QRect(0, 0, width, height), Qt::AlignTop | Qt::AlignHCenter,
"Auswertung Kindersachenmarkt");
painter.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
painter.setFont(fixedFont);
QString content("Einzelteile ohne Nummer\n=======================\n\n");
unsigned int lines{0};
unsigned int pages{1};
@ -139,7 +141,7 @@ void ReportDialog::onPrintReportButtonClicked()
painter.setFont(QFont("Arial", 16, QFont::Bold));
painter.drawText(QRect(0, 0, width, height), Qt::AlignTop | Qt::AlignHCenter,
"Auswertung Kindersachenmarkt");
painter.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
painter.setFont(fixedFont);
QString content("Gesamtstatistik\n===============\n\n");
content += QString("Registrierte Verkäufer: %1\n").arg(sellers.size(), 6);
content += QString("Verkaufte Artikel: %1\n\n").arg(6, 6);