QFrame: rounded and sunken
-
Hello,
It's easy to make a square, sunken QFrame, but how about one with the corners rounded?
I can make a QFrame with rounded corners using the mask method, but they are not sunken.
Thanks for any info.
-
You could use style sheets.
Here is an example with rounded corners :
http://doc.qt.nokia.com/4.7/stylesheet-examples.html#customizing-qframe
-
Thanks, I have been using a style sheet to specify the background color, but as soon as I give the border-radius style, the QFrame loses it's sunken look specified in setFrameStyle.
Is there a list of all the stylesheet styles a frame could use?
-
OK, I see there is border-style: inset; but it doesn't look as good using setFrameStyle. I'll need to experiment more, maybe even drawing my own border.
-
I think using a border image would be the way to go. I doubt Qt can draw the rounded, sunken borders reliably. You can set a border image using style sheets.