hi all,
I want to change the shape of qwidget.I want my widget to have round rectangle shape.
How to do it??
Printable View
hi all,
I want to change the shape of qwidget.I want my widget to have round rectangle shape.
How to do it??
hi,
I have tried setMask but didnt get the desired result
How can i do it .Can you explain more.
did you see an example in QTDIR/examples/widgets/shapedclock?
Here is my example:
Code:
void ShapedMenu::roundCorner() { painter.fillRect(pixmap.rect(), Qt::white); painter.setBrush(Qt::black); painter.drawRoundRect(pixmap.rect(), 10, 10); setMask(pixmap.createMaskFromColor(Qt::white)); }
You could customize the pixmap by design it with Photoshop, CorelDRAW, etc.