void VideoDisplayer::processNextPicture()
{
if((i >= startFrameMarkerPosition)&&(i < endFrameMarkerPosition))
{
//videoLabel->setPixmap(QPixmap(localFileName.at(i)));
//I used this function for the earlier case(normal video display without process functionality) and it works fine but it can't be used now otherwise the drawRectangle() function doesn't work over it
// QFrame::paintEvent(event);
painter.
drawPixmap(0,
0,
400,
400,
QPixmap(localFileName.
at(i
)));
//painter.drawPixmap(0,0,100,100,QPixmap(":/images/frame0000.png"));
int x,y,w,h;
x=100; y=200; w=80;h=60;
painter.setPen(Qt::red);
painter.drawRect(x,y,w,h);
videoLabel->adjustSize();
//videoLabel->setScaledContents(true);
localSlider->setValue(i);
videoLabel->show();
i++;
}
void VideoDisplayer::processNextPicture()
{
if((i >= startFrameMarkerPosition)&&(i < endFrameMarkerPosition))
{
//videoLabel->setPixmap(QPixmap(localFileName.at(i)));
//I used this function for the earlier case(normal video display without process functionality) and it works fine but it can't be used now otherwise the drawRectangle() function doesn't work over it
// QFrame::paintEvent(event);
QPainter painter(videoLabel);
painter.drawPixmap(0,0,400,400,QPixmap(localFileName.at(i)));
//painter.drawPixmap(0,0,100,100,QPixmap(":/images/frame0000.png"));
int x,y,w,h;
x=100; y=200; w=80;h=60;
painter.setPen(Qt::red);
painter.drawRect(x,y,w,h);
videoLabel->adjustSize();
//videoLabel->setScaledContents(true);
localSlider->setValue(i);
videoLabel->show();
i++;
}
To copy to clipboard, switch view to plain text mode
This code displays nothing on the label
Bookmarks