Printsupport: Not necessary to call setLayout when we added the parent

Change-Id: I3504afbc7bb1aaa8c2619532fa4e05740dd6f3c4
Reviewed-by: David Faure <david.faure@kdab.com>
bb10
Laurent Montel 2017-10-10 10:24:16 +02:00
parent f3a21f267f
commit 638dcbe337
3 changed files with 1 additions and 4 deletions

View File

@ -239,7 +239,6 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
m_ui.setupUi(this);
QVBoxLayout *lay = new QVBoxLayout(m_ui.preview);
m_ui.preview->setLayout(lay);
m_pagePreview = new QPagePreview(m_ui.preview);
m_pagePreview->setPagePreviewLayout(1, 1);

View File

@ -337,7 +337,6 @@ void QPrintDialogPrivate::init()
printButton->setDefault(true);
QVBoxLayout *lay = new QVBoxLayout(q);
q->setLayout(lay);
lay->addWidget(top);
lay->addWidget(bottom);
lay->addWidget(buttons);

View File

@ -324,8 +324,7 @@ void QPrintPreviewWidgetPrivate::init()
scene->setBackgroundBrush(Qt::gray);
graphicsView->setScene(scene);
QVBoxLayout *layout = new QVBoxLayout;
q->setLayout(layout);
QVBoxLayout *layout = new QVBoxLayout(q);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(graphicsView);
}