qApp->setStyle(QStyleFactory::create("Fusion")); | |
QPalette darkPalette; | |
darkPalette.setColor(QPalette::Window, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::WindowText, Qt::white); | |
darkPalette.setColor(QPalette::Base, QColor(25,25,25)); | |
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::ToolTipBase, Qt::white); | |
darkPalette.setColor(QPalette::ToolTipText, Qt::white); | |
darkPalette.setColor(QPalette::Text, Qt::white); | |
darkPalette.setColor(QPalette::Button, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::ButtonText, Qt::white); | |
darkPalette.setColor(QPalette::BrightText, Qt::red); | |
darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); | |
darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); | |
darkPalette.setColor(QPalette::HighlightedText, Qt::black); | |
qApp->setPalette(darkPalette); | |
qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"); |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Oct 5, 2014
This comment has been minimized.
This comment has been minimized.
solarkraft
commented
Oct 11, 2014
Looks great! |
This comment has been minimized.
This comment has been minimized.
SebastienBloesch
commented
Feb 22, 2015
Thank you |
This comment has been minimized.
This comment has been minimized.
oaeide
commented
Feb 28, 2015
Wow! This is great stuff. The only thing that isn't perfect out of the box is that deactivated buttons look the same as clickable ones. Otherwise - love it. |
This comment has been minimized.
This comment has been minimized.
lschmierer
commented
Apr 16, 2015
This comment has been minimized.
This comment has been minimized.
ghost
commented
Apr 23, 2015
beautiful :)) |
This comment has been minimized.
This comment has been minimized.
obiwankennedy
commented
Dec 4, 2015
Why do you set both as white and then add qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"); ? |
This comment has been minimized.
This comment has been minimized.
macdew
commented
Apr 27, 2017
Very cool! One thing I spotted was that tab control are a bit black-on-black... Would be nice if the tabs themselves could be shaded a bit differently. |
This comment has been minimized.
This comment has been minimized.
Jorgen-VikingGod
commented
Aug 11, 2017
In my repo you can find similar palette and addition some stylesheets to make everything look dark, sexy and great |
This comment has been minimized.
This comment has been minimized.
Bux42
commented
Jun 6, 2018
This is exactly what I was looking for and it's hella easy to implement, thanks! |
This comment has been minimized.
This comment has been minimized.
CSaratakij
commented
Sep 5, 2018
Look great~ |
This comment has been minimized.
This comment has been minimized.
ofbeaton
commented
Nov 28, 2018
This one doesn't handle disabled text (everything will appear enabled). Jorgen-VikingGod's appears to handle disabled controls properly. |
This comment has been minimized.
This comment has been minimized.
funlw65
commented
Dec 31, 2018
Yeah, but this is a color palette, and the one you refer is a "skin". |
This comment has been minimized.
This comment has been minimized.
matejk
commented
Jun 18, 2019
How can one add palette for disabled controls to qtquickcontrols2.conf? Or is this done in some other way? |
This comment has been minimized.
This comment has been minimized.
mherrmann
commented
Jul 2, 2019
Nice! I use this for my Qt dark theme example of a text editor. |
This comment has been minimized.
This comment has been minimized.
Edward334
commented
Oct 18, 2019
Hi, ok, quick question... I got the dark theme working and all but I got this annoying white border, like 1-2px wide. Currently I'm looking at Jorgen-VikingGod's example trying to figure out exactly what is the property that disables that border but maybe someone can enlighten me. Thanks ! |
This comment has been minimized.
dridk commentedJun 14, 2014
Screenshot please!