Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QFrame: rounded and sunken
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.
Eddy last edited by
You could use style sheets.
Here is an example with rounded corners :
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.
andre last edited by
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.