summaryrefslogtreecommitdiffstats
path: root/tests/auto/qboxlayout/tst_qboxlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qboxlayout/tst_qboxlayout.cpp')
-rw-r--r--tests/auto/qboxlayout/tst_qboxlayout.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qboxlayout/tst_qboxlayout.cpp b/tests/auto/qboxlayout/tst_qboxlayout.cpp
index c4acfdc..659f8a5 100644
--- a/tests/auto/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/qboxlayout/tst_qboxlayout.cpp
@@ -198,7 +198,8 @@ void tst_QBoxLayout::sizeConstraints()
void tst_QBoxLayout::setGeometry()
{
- QWidget w;
+ QWidget toplevel;
+ QWidget w(&toplevel);
QVBoxLayout *lay = new QVBoxLayout;
lay->setMargin(0);
lay->setSpacing(0);
@@ -209,7 +210,7 @@ void tst_QBoxLayout::setGeometry()
lay2->setAlignment(Qt::AlignRight);
lay->addLayout(lay2);
w.setLayout(lay);
- w.show();
+ toplevel.show();
QRect newGeom(0, 0, 70, 70);
lay2->setGeometry(newGeom);