]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
DolphinView: set the parent of layout in the ctor
[dolphin.git] / src / views / dolphinview.cpp
index ef346b3e40f5042fdf0c3a3a3ce25bd26f01527b..71c16bf46de31476f9a4e9a365fdea6a14b326da 100644 (file)
@@ -140,9 +140,8 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
     m_placeholderLabel->setGraphicsEffect(effect);
     // Set initial text and visibility
     updatePlaceholderLabel();
-    // Add a new layout to hold it and put it in the layout
-    auto *centeringLayout = new QVBoxLayout(this);
-    m_container->setLayout(centeringLayout);
+
+    auto *centeringLayout = new QVBoxLayout(m_container);
     centeringLayout->addWidget(m_placeholderLabel);
     centeringLayout->setAlignment(m_placeholderLabel, Qt::AlignCenter);