Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
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.