I'm learning Qt and do you know to set black theme for mainwindow at Qt? I think that it's doing by css stylesheet or anything like this. I hope at your help. Sorry for bad English!
Asked
Active
Viewed 3,616 times
0
-
1I use this https://github.com/ColinDuquesnoy/QDarkStyleSheet – drescherjm Dec 09 '18 at 14:16
-
Possible dupe of https://stackoverflow.com/questions/48256772/dark-theme-for-qt-widgets – Umbral Reaper Apr 28 '21 at 01:57
2 Answers
1
You can do it:
QApplication::setStyle(const QString & style);
You may do it on qss stylesheet (it's like css) For create your style file read more on Qt docs: http://doc.qt.io/Qt-5/stylesheet-reference.html

amiranys
- 193
- 1
- 5
0
You can change it from its stylesheet.
QMainWindow{
background-color: rgb(0, 0, 0)
}
Just add this styling in your stylesheet, and it will work.

Ozan Yurtsever
- 1,274
- 8
- 32
-
2But what is about a bar where close and hide buttons? The weren't changed to black – sardorkun Dec 09 '18 at 14:18