Hi,
(I thought I posted this post before but I can't find it, so if this is a double post please merge)
I would like to clip the corners or a dialog widget (which is QWidget) in order to have round corners.
Since the size of the dialog can be changed, I need to clip each conrner when the widget is being redrawn. (instead of using a mask on the whole dialog)
I read the docs about clipping, but I didn't quite understand how I can do that...
I know I can clip a region with a QPainter, and I know i can generate any kind of mask using a QRegion that takes a QBitmap as argument.
But what I don't understand is, when I construct QRect(QBitmap()) then how can I position my QRect in x,y position where I want to clip my widget (i.e upper right corner)?
Thanks.
EDIT: I just though maybe setClipRect() and setClipRegion() can be used in conjunction... I'll try that.
Bookmarks