mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
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
This commit is contained in:
parent
a87a7b72df
commit
df05369dbf
Binary file not shown.
@ -1108,8 +1108,11 @@ void QgsLayoutExporter::updatePrinterPageSize( QgsLayout *layout, QPrinter &prin
|
|||||||
{
|
{
|
||||||
QgsLayoutSize pageSize = layout->pageCollection()->page( page )->sizeWithUnits();
|
QgsLayoutSize pageSize = layout->pageCollection()->page( page )->sizeWithUnits();
|
||||||
QgsLayoutSize pageSizeMM = layout->renderContext().measurementConverter().convert( pageSize, QgsUnitTypes::LayoutMillimeters );
|
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 ),
|
||||||
|
QPageLayout::Portrait,
|
||||||
|
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
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user