First of all, thank you for your open source. I just learned Qt not long ago. I ran your test example and the effect was great. But I encountered a problem. I wanted to set up QSS for more ui controls. But when I use
ui->setupUi(this);
QFile file(":/darkstyle.qss");
if (file.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(file.readAll());
setStyleSheet(styleSheet); // Set the read content as the global style sheet
file.close();
}```,
comment out
setStyleSheet(".MainWindow{"
"background-color: #616161;"
"}");
The main body of the window is transparent.
I don't know how I should modify it,
because your example only has one way to change the
style of a PUSHBUTTON. If you change it one by one,
this is definitely not good. If you can, I hope you can
Give me some tips.