From 1b7c70ca5d0622784f2f794e96c44873ee287c82 Mon Sep 17 00:00:00 2001 From: Jerzy Kozera Date: Sat, 2 Feb 2013 15:50:47 +0000 Subject: [PATCH] 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 --- src/widgets/styles/qcommonstyle.cpp | 6 +++--- 1 file 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);