Border-radius won't apply to the current widget
-
hello,
i want to set the border radius of the current widget by @setStylSheet("border-radius: 5px")@
but nothing appear when showing the widget
for information i set the @FramelessWindowHint@ Flag for my window
it style a rectangle window , no radius :( -
Hi,
AFAIK this wont work for a top level window.
As an alternative you can add a QWidget to the Window and set radius from the stylesheet to this QWidget and also need
@
setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::FramelessWindowHint);
@Tested above with a QDialog.
-
i want to apply this to my top level widget :(
-
Styelsheets wont work here. Other than that you reimplement paintEvent and draw it all yourself. Have a look at "shapedclock":http://qt-project.org/doc/qt-5/qtwidgets-widgets-shapedclock-example.html
-
thanks , (y)
this is a good idea , (y)