summaryrefslogtreecommitdiffstats
path: root/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp')
-rw-r--r--tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp
index da83826..d6c4b53 100644
--- a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp
@@ -353,12 +353,13 @@ void tst_QAbstractScrollArea::task214488_layoutDirection()
void tst_QAbstractScrollArea::patternBackground()
{
- QScrollArea scrollArea;
+ QWidget topLevel;
+ QScrollArea scrollArea(&topLevel);
scrollArea.resize(200, 200);
QWidget widget;
widget.resize(600, 600);
scrollArea.setWidget(&widget);
- scrollArea.show();
+ topLevel.show();
QLinearGradient linearGrad(QPointF(250, 250), QPointF(300, 300));
linearGrad.setColorAt(0, Qt::yellow);