From cd48b781d1c48fa4d421ba900b2772d24ecf0dff Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 5 Nov 2024 17:10:45 +0100 Subject: [PATCH] StyleSheet baseline test for TreeView: include one with empty area So far, the entire tree view was filled with items, so we didn't see how the empty area below the last item was rendered. Take a screen shot of the tree after giving it twice the space it originally has to get some empty area included as well, without breaking existing baseline images. Task-number: QTBUG-123632 Change-Id: I50714c0b3b04f4b1844e52063d0c0c77ff2d7154 Reviewed-by: Christian Ehrlicher (cherry picked from commit 4be99b1900f3ba7414a9acbc4777a669fcbd8e3a) Reviewed-by: Qt Cherry-pick Bot --- tests/baseline/stylesheet/tst_baseline_stylesheet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/baseline/stylesheet/tst_baseline_stylesheet.cpp b/tests/baseline/stylesheet/tst_baseline_stylesheet.cpp index 1028c68250f..ea837089ddc 100644 --- a/tests/baseline/stylesheet/tst_baseline_stylesheet.cpp +++ b/tests/baseline/stylesheet/tst_baseline_stylesheet.cpp @@ -206,6 +206,9 @@ void tst_Stylesheet::tst_QTreeView() tw->topLevelItem(Children)->child(0)->setSelected(true); QBASELINE_CHECK_DEFERRED(takeSnapshot(), "itemSelected"); + + testWindow()->resize(testWindow()->size() * 2); + QBASELINE_CHECK_DEFERRED(takeSnapshot(), "withEmptyArea"); } void tst_Stylesheet::tst_QHeaderView_data()