Skip to content
Browse files
Hack is still required, but maybe using non-deprecated api will help?
Sometimes qt is great, sometimes I want to punch it in it's silly
little cute face
  • Loading branch information
nyalldawson committed Jul 30, 2018
1 parent a87a7b7 commit df05369dbfa5270e90e8c94f2a88b850030dc316
Binary file not shown.
@@ -1108,8 +1108,11 @@ void QgsLayoutExporter::updatePrinterPageSize( QgsLayout *layout, QPrinter &prin
QgsLayoutSize pageSize = layout->pageCollection()->page( page )->sizeWithUnits();
QgsLayoutSize pageSizeMM = layout->renderContext().measurementConverter().convert( pageSize, QgsUnitTypes::LayoutMillimeters );
printer.setOrientation( layout->pageCollection()->page( page )->orientation() == QgsLayoutItemPage::Portrait ? QPrinter::Portrait : QPrinter::Landscape );
printer.setPaperSize( pageSizeMM.toQSizeF(), QPrinter::Millimeter );

QPageLayout pageLayout( QPageSize( pageSizeMM.toQSizeF(), QPageSize::Millimeter ),
QMarginsF( 0, 0, 0, 0 ) );
printer.setPageLayout( pageLayout );

QgsLayoutExporter::ExportResult QgsLayoutExporter::renderToLayeredSvg( const SvgExportSettings &settings, double width, double height, int page, QRectF bounds, const QString &filename, int svgLayerId, const QString &layerName, QDomDocument &svg, QDomNode &svgDocRoot, bool includeMetadata ) const

0 comments on commit df05369

Please sign in to comment.