About colour theme and layout design of QT Creator
-
Hi all. I have the Qt creator 4.1.0 and from Tools -> Options... -> Environment -> Interface -> Theme: I have chosen Flat Dark. This is the best for me.
But when I create a widget, for example in mainwindow.ui, when I go to design (not to code), the colour of the widget is black - dark, but when I run the app it is light - white.
Can't it be the same?
-
Hi
As far as i know that style is only for Creator
"C:\Qt\Tools\QtCreator\share\qtcreator\themes\dark.creatortheme"
If you open file u see it sets tons of colors
[Palette]
shadowBackground=ff232323
text=ffe7e7e7
textDisabled=7fffffff
hoverBackground=18ffffff
selectedBackground=46ffffff
normalBackground=ff333333
alternateBackground=ff515151
error=ffff0000
textColorLink=ff007af4
textColorLinkVisited=ffa57aff
backgroundColorDisabled=ff444444Its based on Fusion. so you might be able to recreate it if you
care to dig into it.qApp->setStyle(QStyleFactory::create("Fusion")); QPalette 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)); p.setColor(QPalette::WindowText, QColor(255,255,255)); qApp->setPalette(p);