summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc7
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp5
2 files changed, 10 insertions, 2 deletions
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index 00323eace6..12e27a71ad 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -59,6 +59,11 @@
\li \l{Qt Style Sheets Examples}
\endlist
+ \note If Qt Style Sheets are used on the same widget as functions that
+ set the appearance of widgets, such as \l QWidget::setFont() or
+ \l QTreeWidgetItem::setBackground(), style sheets will take precedence
+ if the settings conflict.
+
\target overview
\section1 Overview
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index be7ddd8b30..6da5ca0f4c 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
@@ -1284,6 +1284,9 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const
Sets the background brush of the label in the given \a column to the
specified \a brush.
+ \note If \l{Qt Style Sheets} are used on the same widget as setBackground(),
+ style sheets will take precedence if the settings conflict.
+
\sa setForeground()
*/