path.moveTo(150, 200);
path.quadTo(150, 150, 200, 150);
path.lineTo(402, 150);
path.lineTo(402, 400);
path.quadTo(402, 450, 350, 450);
path.lineTo(150, 450);
path.closeSubpath();
painter->setPen(pen);
painter->drawImage(boundingRect(), image);
painter->drawPath(path);
QPainterPath path;
path.moveTo(150, 200);
path.quadTo(150, 150, 200, 150);
path.lineTo(402, 150);
path.lineTo(402, 400);
path.quadTo(402, 450, 350, 450);
path.lineTo(150, 450);
path.closeSubpath();
painter->setPen(pen);
painter->drawImage(boundingRect(), image);
painter->drawPath(path);
To copy to clipboard, switch view to plain text mode
My problem here is that I don't know how to remove the image corners popping out at the top-left hand corner and the bottom-right hand corner. All I did was to draw the paintPath over the edges of the image. I am not ever sure if that should have been the approach.
Bookmarks