PDA

View Full Version : Use QPainter to draw on a videoStream



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.

wysota
9th September 2016, 10:20
How is CameraView related to FrameLabel?