PDA

View Full Version : Draw border of a QRegion



QNewbie
5th June 2014, 22:18
Hello everyone, I'm having a problem drawing the border of a QRegion...
It so happens I was trying to develop a small loader with borders rounded, so I followed Google until I found a solution here on the forums. I clipped the drawing area with the use of QRegion, now, I've got the QRegion of the whole QWidget, and I need to paint the borders for it as it's been clipped (the region is contained inside a QRegion that I previously mentioned).
I've been suggested to use another approach like to generate a QPolygon and use a drawing path for that, but I don't know how to do it.
Is there any way I can paint the borders of that QRegion?

anda_skoa
6th June 2014, 07:58
Hmm.

Have you tried QPainterPath::addRegion()?

Cheers,
_

QNewbie
6th June 2014, 14:23
Yes, to not the desired avail. It paints where the decorated window should be, don't really know why it does so but so it does..