PDA

View Full Version : widget with rounded corners



sreedhar
6th June 2006, 14:57
hi,
I want to have a widget with rounded corners, i.e no sharp corners. i.e arcs in place of corners at the four ends.

Please provide me a code snippet if possible

Thankig you,

regards,
sreedhar

jacek
6th June 2006, 15:00
What do you mean by widget? A standalone window or a widget that you can put on other widgets?

sreedhar
7th June 2006, 10:07
I want to place a small widget on top of another widget. i.e the top widget is the child of the below widget

regards

zlatko
7th June 2006, 10:53
Play with setMask

wysota
7th June 2006, 13:18
IMO you just need to leave the corners not drawn in the paint event of your widget. There is even no reason to use setMask. In Qt4.1+ there is no background drawn by default. In Qt4.0 I think you need to pass some flag to your widget to enable the same behaviour.