Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 5.15.2
-
Fix Version/s: None
-
Component/s: GUI: Printing
-
Labels:None
-
Platform/s:
Description
void PrintSettingsWidget::openPrinterPropertiesDialog() { auto *dlg = new QPageSetupDialog(&m_printer, this); dlg->setWindowModality(Qt::ApplicationModal); dlg->open(this, SLOT(propertiesDialogAccepted())); } void PrintSettingsWidget::propertiesDialogAccepted() { qDebug() << m_printer.printerName() << "margins" << m_printer.pageLayout().margins(); }
shows that the printer name is updated by the page setup dialog, but not the margins.
That's because the margins get saved into m_pageLayout, but this is copied into the QPrinter only by setupPrinter(), called by QPageSetupDialog::exec() in qpagesetupdialog_unix.cpp
The implementation of open() is generic and misses that code.