diff options
Diffstat (limited to 'tests/auto/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r-- | tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 6c1ac54..5cb9173 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -3072,9 +3072,11 @@ void tst_QGraphicsView::scrollAfterResize_data() QTest::addColumn<QTransform>("x2"); QTest::addColumn<QTransform>("x3"); - int frameWidth = qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); - int extent = qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent); - int inside = qApp->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents); + QPlastiqueStyle style; + + int frameWidth = style.pixelMetric(QStyle::PM_DefaultFrameWidth); + int extent = style.pixelMetric(QStyle::PM_ScrollBarExtent); + int inside = style.styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents); int viewportWidth = 300; int scrollBarIndent = viewportWidth - extent - (inside ? 4 : 2)*frameWidth; @@ -3095,7 +3097,9 @@ void tst_QGraphicsView::scrollAfterResize() QFETCH(QTransform, x2); QFETCH(QTransform, x3); + QPlastiqueStyle style; QGraphicsView view; + view.setStyle(&style); if (reverse) view.setLayoutDirection(Qt::RightToLeft); |