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>
This commit is contained in:
parent
f316502d58
commit
1b7c70ca5d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user