diff options
author | Jerzy Kozera <jerzy.kozera@gmail.com> | 2013-02-02 15:50:47 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-05 21:05:14 +0100 |
commit | 1b7c70ca5d0622784f2f794e96c44873ee287c82 (patch) | |
tree | 0f968d4769f34011afabe738dc3ce80cf00f51d7 | |
parent | f316502d58c947863f5caf17c64dc68d865162a4 (diff) |
Allow overriding subElementRect in QProxyStyle for ItemViewItem
proxy() should be used instead of direct calls to QCommonStyle methods
to allow overriding behavior in QProxyStyle, while keeping fallback
to default behavior.
Change-Id: I338e6b65f4c0ee77c55f03c412f59877fad42b79
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index d1d80f5af0..969e31d881 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -2138,9 +2138,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, p->save(); p->setClipRect(opt->rect); - QRect checkRect = subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget); - QRect iconRect = subElementRect(SE_ItemViewItemDecoration, vopt, widget); - QRect textRect = subElementRect(SE_ItemViewItemText, vopt, widget); + QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget); + QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, vopt, widget); + QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, vopt, widget); // draw the background proxy()->drawPrimitive(PE_PanelItemViewItem, opt, p, widget); |