Does anyone know how one would be able to set a background color for the whole window of a Qt application?
So far I am using stylesheets but can only figure out how to assign a background color to a widget such as QGroupBox
or QPushButton
. Basically, if I want a black background how would I make it seamless without any borders of the original background?
I would simply use a Style Sheet for the whole window.
For instance, if your window is inheriting from QWidget, here is what I'm doing :
On my Mac, my whole application window is black (except the title bar).
EDIT : according to comment, here is a solution without using ui files and loading an external style sheet
The style sheet file (default.qss) is as follow :
This file is part of a resource file (stylesheet.qrc) :
And here is my project file :