diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-05-15 13:42:16 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-06-05 15:31:42 +0200 |
commit | 804a18ef0ec4a054778e223c8cec6ee26dec3f76 (patch) | |
tree | 4083f4515b0df494364363ed95de6e10f053e64f /src | |
parent | 4ebac33644d5db0b727680f1dacb18616daafe86 (diff) |
Document that QHeaderView rendered with themed style might ignore roles
While this is generally true for widgets, QHeaderView's documentation
about how appearance related data roles are respected can be misleading.
Fixes: QTBUG-31804
Change-Id: I93c6562e59ecf771d938d282723169202ac15bc2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 7bfa51337d..ed418f143c 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -146,7 +146,10 @@ static const int maxSizeSection = 1048575; // since section size is in a bitfiel Not all \l{Qt::}{ItemDataRole}s will have an effect on a QHeaderView. If you need to draw other roles, you can subclass QHeaderView and reimplement \l{QHeaderView::}{paintEvent()}. - QHeaderView respects the following item data roles: + QHeaderView respects the following item data roles, unless they are + in conflict with the style (which can happen for styles that follow + the desktop theme): + \l{Qt::}{TextAlignmentRole}, \l{Qt::}{DisplayRole}, \l{Qt::}{FontRole}, \l{Qt::}{DecorationRole}, \l{Qt::}{ForegroundRole}, and \l{Qt::}{BackgroundRole}. |