Fix page size selection in QPageSetupDialog
Task-number: QTBUG-44978 Change-Id: Id0c0188d62e344fad93d9bbf57b3f90ce899405d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
dde8c6f77e
commit
63285e3e1b
@ -353,10 +353,10 @@ void QPageSetupWidget::initPageSizes()
|
||||
// If PdfFormat or no available printer page sizes, populate with all page sizes
|
||||
for (int id = 0; id < QPageSize::LastPageSize; ++id) {
|
||||
if (QPageSize::PageSizeId(id) == QPageSize::Custom) {
|
||||
m_ui.pageSizeCombo->addItem(tr("Custom"), id);
|
||||
m_ui.pageSizeCombo->addItem(tr("Custom"), QVariant::fromValue(QPageSize::Custom));
|
||||
} else {
|
||||
QPageSize pageSize = QPageSize(QPageSize::PageSizeId(id));
|
||||
m_ui.pageSizeCombo->addItem(pageSize.name(), id);
|
||||
m_ui.pageSizeCombo->addItem(pageSize.name(), QVariant::fromValue(pageSize.id()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user