summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlayout
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlayout')
-rw-r--r--tests/auto/qlayout/tst_qlayout.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qlayout/tst_qlayout.cpp b/tests/auto/qlayout/tst_qlayout.cpp
index c6fe3f0..a974a42 100644
--- a/tests/auto/qlayout/tst_qlayout.cpp
+++ b/tests/auto/qlayout/tst_qlayout.cpp
@@ -133,12 +133,13 @@ void tst_QLayout::geometry()
// For QWindowsStyle we know that QWidgetItem::geometry() and QWidget::geometry()
// should be the same.
QApplication::setStyle(new QWindowsStyle);
- QWidget w;
+ QWidget topLevel;
+ QWidget w(&topLevel);
QVBoxLayout layout(&w);
SizeHinterFrame widget(QSize(100,100));
layout.addWidget(&widget);
QLayoutItem *item = layout.itemAt(0);
- w.show();
+ topLevel.show();
QApplication::processEvents();
QCOMPARE(item->geometry().size(), QSize(100,100));