[SOLVED] Fusion style - how to set dark version?
-
Hi,
Referring to this article: http://blog.qt.digia.com/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/ you find dark version of fusion style. Is it compiled in QT by default? I don't know how to set it.
Regards
-
Thanks! Working perfect. But can't find color name for tabsheet text. I have this:
QApplication::setStyle(QStyleFactory::create("Fusion")); QPalette p; p = qApp->palette(); p.setColor(QPalette::Window, QColor(53,53,53)); p.setColor(QPalette::Button, QColor(53,53,53)); p.setColor(QPalette::Highlight, QColor(142,45,197)); p.setColor(QPalette::ButtonText, QColor(255,255,255)); qApp->setPalette(p);
All buttons have white font except tabsheet text where it is still black
edit: please wrap code sections between @ signs; Andre
-
This technique works, but I wouldn't say the result is "perfect". The Fusion style generates lots of colors automatically by calling QColor::lighter() and QColor::darker(), and those would need to be inverted for the result to be perfect. As a result, depending on the exact colors you use, the frames around menus and the separators between menu items, for example, tend to disappear...