summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qprintpreviewdialog.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-03-07 19:06:05 (GMT)
committerLorn Potter <lorn.potter@nokia.com>2010-03-07 19:06:05 (GMT)
commit987ffcbad3337fd343febb305911298a37ed9b7e (patch)
tree3665886405a5bc5300ef8a1c0522780639f29843 /src/gui/dialogs/qprintpreviewdialog.cpp
parent4e605d83b5966b08a82eb54e733c2f37bca6b5d6 (diff)
parent987458462994497f764baf253baca0faabdb63cc (diff)
downloadQt-987ffcbad3337fd343febb305911298a37ed9b7e.zip
Qt-987ffcbad3337fd343febb305911298a37ed9b7e.tar.gz
Qt-987ffcbad3337fd343febb305911298a37ed9b7e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/dialogs/qprintpreviewdialog.cpp')
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index 6723b53..f21343e 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -273,7 +273,20 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
QWidget *pageEdit = new QWidget(toolbar);
QVBoxLayout *vboxLayout = new QVBoxLayout;
vboxLayout->setContentsMargins(0, 0, 0, 0);
+#ifdef Q_WS_MAC
+ // We query the widgets about their size and then we fix the size.
+ // This should do the trick for the laying out part...
+ QSize pageNumEditSize, pageNumLabelSize;
+ pageNumEditSize = pageNumEdit->minimumSizeHint();
+ pageNumLabelSize = pageNumLabel->minimumSizeHint();
+ pageNumEdit->resize(pageNumEditSize);
+ pageNumLabel->resize(pageNumLabelSize);
+#endif
QFormLayout *formLayout = new QFormLayout;
+#ifdef Q_WS_MAC
+ // We have to change the growth policy in Mac.
+ formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
+#endif
formLayout->setWidget(0, QFormLayout::LabelRole, pageNumEdit);
formLayout->setWidget(0, QFormLayout::FieldRole, pageNumLabel);
vboxLayout->addLayout(formLayout);