Doc: Add notes about Qt Style Sheets taking precedence

...over setting properties on individual widgets.

Task-number: QTBUG-28675
Change-Id: Ic7bfd723ed8970112a9892727170d3bacaa1903f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
Leena Miettinen 2019-10-30 10:50:41 +01:00
parent faff69968b
commit f54e97726f
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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()
*/