void DiagramWidget
::paintEvent ( QPaintEvent * event
) {
// my own drawing code
DiagramPainter diagramPainter;
diagramPainter.
paint(&p,
QRect(0,
0,width
(), height
()), m_results, m_inputData
);
// here I want to write the frame/panel border, but that won't work
panel.initFrom(this);
style
()->drawPrimitive
(QStyle::PE_FrameFocusRect,
&panel,
&p,
this);
}
void DiagramWidget::paintEvent ( QPaintEvent * event ) {
QStylePainter p(this);
// my own drawing code
DiagramPainter diagramPainter;
diagramPainter.paint(&p, QRect(0,0,width(), height()), m_results, m_inputData);
// here I want to write the frame/panel border, but that won't work
QStyleOptionFrameV2 panel;
panel.initFrom(this);
style()->drawPrimitive(QStyle::PE_FrameFocusRect, &panel, &p, this);
}
To copy to clipboard, switch view to plain text mode
Bookmarks