I have implemented it as:
if((i >= startFrameMarkerPosition)&&(i < endFrameMarkerPosition))
{
painter.
drawPixmap(0,
0,
QPixmap(currentFrameName
));
//When this line //is commented,even then the rectangle drawn below is not displayed.Actually neither of them //is working(the 'drawPixmap' and the 'drawRect')
int x,y,w,h;
x=100; y=200; w=80;h=60;
painter.setPen(Qt::red);
painter.drawRect(x,y,w,h);
//QLabel::paintEvent(event);
localSlider->setValue(i);
i++;
}
if((i >= startFrameMarkerPosition)&&(i < endFrameMarkerPosition))
{
painter.drawPixmap(0,0,QPixmap(currentFrameName));//When this line //is commented,even then the rectangle drawn below is not displayed.Actually neither of them //is working(the 'drawPixmap' and the 'drawRect')
int x,y,w,h;
x=100; y=200; w=80;h=60;
painter.setPen(Qt::red);
painter.drawRect(x,y,w,h);
//QLabel::paintEvent(event);
localSlider->setValue(i);
i++;
}
To copy to clipboard, switch view to plain text mode
Can you tell me how to draw on an image!
Bookmarks