thierry Joel
1st September 2016, 08:58
I have a videoStream in a FrameLabel and i want to use QPainter to draw a rectangle on it, But when i do something like this:
void CameraView::paintEvent(QPaintEvent * /*event*/)
{
QPainter painter(this);
painter.setPen(Qt::blue);
painter.drawRect(QRect( 500, 0, 150, 150));
}
The rectangle is drawn behind the FrameLabel (i.e. behinde the videoStream)
I would be very grateful if anyone can show me an easy way to go around this.
void CameraView::paintEvent(QPaintEvent * /*event*/)
{
QPainter painter(this);
painter.setPen(Qt::blue);
painter.drawRect(QRect( 500, 0, 150, 150));
}
The rectangle is drawn behind the FrameLabel (i.e. behinde the videoStream)
I would be very grateful if anyone can show me an easy way to go around this.