qt5base-lts/tests/auto/widgets/itemviews/qtreewidget
Christian Ehrlicher 96c27eb710 QList/Table/TreeWidgetItem: Allow reseting values by passing the default value
The convenience functions setBackground(), setForeground() and
setSizeHint() a default constructed value as 'reset'. This means a
default constructed QBrush or QSize is returned in the data() function
which leads to an unexpected background or forground color or size hint.
Therefore check if the passed value is a default constructed value and
set an empty QVariant instead which.

[ChangeLog][QtWidgets][ItemViews] The convenience views
QList/Table/TreeWidgetItem now treat a default constructed QBrush or
QSize as an empty QVariant which allows to reset the values set to it's
default values.

Task-number: QTBUG-76423
Change-Id: I840570bbad3e5fd8c5b4b58903b4fd0066dbdeb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-11-22 22:02:15 +01:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qtreewidget.pro QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
tst_qtreewidget.cpp QList/Table/TreeWidgetItem: Allow reseting values by passing the default value 2019-11-22 22:02:15 +01:00