I'm trying to change skin of a program that supports Qt Style CSS, but I don't have access to the source code. I need to change the background color of the groups inside a QWidget,
I tried with:
QWidget {
background-color: #4d4d4d;
}
But it changes the color of the whole window, but I can still see the rectangle semi-transparent (like black 95% opacity). What class do I need to edit to change that particular box?
You are changing the style for the class QWidget
which is the base for any Qt widget.
If you want to change the style for the group only, that's the QGroupBox
class.
QGroupBox{
background-color: #4d4d4d;
}
Some QSS examples in the doc : https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qgroupbox
If you want to set the style on a specific widget of the application you will need more information from the code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.