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.
This comment has been minimized.
This comment has been minimized.
Looks great! |
This comment has been minimized.
This comment has been minimized.
Thank you |
This comment has been minimized.
This comment has been minimized.
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.
This comment has been minimized.
This comment has been minimized.
beautiful :)) |
This comment has been minimized.
This comment has been minimized.
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.
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.
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.
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.
Look great~ |
This comment has been minimized.
This comment has been minimized.
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.
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.
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.
Nice! I use this for my Qt dark theme example of a text editor. |
This comment has been minimized.
This comment has been minimized.
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.
This comment has been minimized.
I had to fix appearance of disabled widgets: QColor darkGray(53, 53, 53);
QColor gray(128, 128, 128);
QColor black(25, 25, 25);
QColor blue(42, 130, 218);
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, darkGray);
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, black);
darkPalette.setColor(QPalette::AlternateBase, darkGray);
darkPalette.setColor(QPalette::ToolTipBase, blue);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);
darkPalette.setColor(QPalette::Button, darkGray);
darkPalette.setColor(QPalette::ButtonText, Qt::white);
darkPalette.setColor(QPalette::Link, blue);
darkPalette.setColor(QPalette::Highlight, blue);
darkPalette.setColor(QPalette::HighlightedText, Qt::black);
darkPalette.setColor(QPalette::Active, QPalette::Button, gray.darker());
darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, gray);
darkPalette.setColor(QPalette::Disabled, QPalette::Text, gray);
darkPalette.setColor(QPalette::Disabled, QPalette::Light, darkGray); |
This comment has been minimized.
This comment has been minimized.
Thanks @leplatrem, @QuantumCD I've used the style in my steganography app. |
This comment has been minimized.
This comment has been minimized.
Awesome thank you! For Python, use this:
|
This comment has been minimized.
Screenshot please!