Merge pull request 'Fix crash caused by margins being a float' (#6) from fix-margins-float into master
Reviewed-on: #6
This commit is contained in:
commit
9de15f7a47
@ -383,7 +383,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
margin_top = float(self.settings.value('margin_top', 20))
|
margin_top = float(self.settings.value('margin_top', 20))
|
||||||
margin_bottom = float(self.settings.value('margin_bottom', 20))
|
margin_bottom = float(self.settings.value('margin_bottom', 20))
|
||||||
self.settings.endGroup()
|
self.settings.endGroup()
|
||||||
margins = QtCore.QMarginsF(QtCore.QMargins(margin_left, margin_top, margin_right, margin_bottom))
|
margins = QtCore.QMarginsF(margin_left, margin_top, margin_right, margin_bottom)
|
||||||
page_layout = QtGui.QPageLayout(page_size, orientation, margins, unit)
|
page_layout = QtGui.QPageLayout(page_size, orientation, margins, unit)
|
||||||
# Export to PDF
|
# Export to PDF
|
||||||
self.preview_view.page().printToPdf(str(filename), page_layout)
|
self.preview_view.page().printToPdf(str(filename), page_layout)
|
||||||
|
Loading…
Reference in New Issue
Block a user