Commit 4d9ddcfb authored by Michael Winkelmann's avatar Michael Winkelmann

QML printer fix

parent 3c5f8fc8
......@@ -37,7 +37,7 @@ bool QmlPrinter::printPdf(const QString &location, QQuickItem *rootItem) {
printer.setOutputFileName(location);
printer.setFullPage(true);
printer.setPageLayout(QPageLayout(QPageSize(QSize(height, width)),
QPageLayout::Portrait,
QPageLayout::Landscape,
QMarginsF(0, 0, 0, 0), QPageLayout::Pica));
printer.setResolution(resolution());
......@@ -46,13 +46,13 @@ bool QmlPrinter::printPdf(const QString &location, QQuickItem *rootItem) {
// effect after newPage is called (painter.begin() calls this method)
changePrinterOrientation(printer, width, height);
// SubItemStrategy strategy;
SubItemStrategy strategy;
/*
PrintStrategy strategy = [](QQuickItem* root, ItemList& items, ItemList& masterItems) {
items.push_back({ root, QVariantMap() });
return true;
};
*/
return printItems(printer,rootItem,strategy);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment