Qt 6.11 is out! See what's new in the release
blog
How to get a 1 pixel black border on a frameless dialog?
-
I have a couple of instances of a Dialog which I don't want a titlebar or widgets, so I call:
setWindowFlags(Qt::FramelessWindowHint);In the class constructor, however I would like a single pixel, maybe 2 pixel black border around the dialog just to make it clear and standout when it overlays another dialog of the same background colour.
I've tried setting the style sheet using:
setStyleSheet("QDialog {border:1px solid black}");It doesn't do anything.
-
I have a couple of instances of a Dialog which I don't want a titlebar or widgets, so I call:
setWindowFlags(Qt::FramelessWindowHint);In the class constructor, however I would like a single pixel, maybe 2 pixel black border around the dialog just to make it clear and standout when it overlays another dialog of the same background colour.
I've tried setting the style sheet using:
setStyleSheet("QDialog {border:1px solid black}");It doesn't do anything.

