MCPcopy Create free account
hub / github.com/baldurk/renderdoc / paintEvent

Method paintEvent

qrenderdoc/Widgets/CollapseGroupBox.cpp:95–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void CollapseGroupBox::paintEvent(QPaintEvent *)
96{
97 QStylePainter paint(this);
98 QStyleOptionGroupBox option;
99 initStyleOption(&option);
100
101 // pretend we have a groupbox so the painting allocates space for it
102 option.subControls |= QStyle::SC_GroupBoxCheckBox;
103
104 paint.drawComplexControl(QStyle::CC_GroupBox, option);
105
106 // now paint over the checkbox
107
108 QRect checkBoxRect =
109 style()->subControlRect(QStyle::CC_GroupBox, &option, QStyle::SC_GroupBoxCheckBox, this);
110
111 paint.fillRect(checkBoxRect, palette().brush(QPalette::Window));
112
113 QStyleOption arrowOpt = option;
114 arrowOpt.rect = checkBoxRect;
115 paint.drawPrimitive(m_collapsed ? QStyle::PE_IndicatorArrowRight : QStyle::PE_IndicatorArrowDown,
116 arrowOpt);
117}
118
119void CollapseGroupBox::mouseReleaseEvent(QMouseEvent *event)
120{

Callers

nothing calls this directly

Calls 5

fillRectMethod · 0.80
styleFunction · 0.50
drawComplexControlMethod · 0.45
subControlRectMethod · 0.45
drawPrimitiveMethod · 0.45

Tested by

no test coverage detected