summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qprintpreviewdialog.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 19:46:59 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 19:46:59 (GMT)
commite99a9e6b8ef0521e46742fe876766a6021f0121d (patch)
tree96a81faa8e17b625e18e1ef94c51d3efbfd16787 /src/gui/dialogs/qprintpreviewdialog.cpp
parent186f75db32bdc177bdbc192552cf7275d9723c85 (diff)
parent930c6554022cd30149912c92e88a7884609b44ba (diff)
downloadQt-e99a9e6b8ef0521e46742fe876766a6021f0121d.zip
Qt-e99a9e6b8ef0521e46742fe876766a6021f0121d.tar.gz
Qt-e99a9e6b8ef0521e46742fe876766a6021f0121d.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix build with Mesa 7.8's EGL implementatioon Reset the byte order in the iconv codec after using it. fix "using namespace" recursion crash Fixed key mappings on X11 QDom: prevent infinite loop when cloning a DTD QPrintPreviewDialog number of pages is partially blocked from view in OSX Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( f3110d2f94c825477afac054ed448e45d47f5670 )
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);