Qt Creator color scheme
Asked Answered
B

9

94

I like the dark "FakeVim" color scheme in Qt Creator. However it only makes the editor part dark while everything else stays normal, which is a bit disturbing. Is there any way to make such dark scheme global for Qt Creator?

Vim (dark) Color Scheme Vim Color Scheme

Color scheme is applied solely to text editor (as this is the only option), and not the environment. Vim applied to text editor

Bivalve answered 11/2, 2010 at 13:44 Comment(1)
Qt Creator version 3.5.1 says it fixed this problem here.False
M
71

Simple in two line

  1. Go to "Tools" -> "Options" -> "Environment" -> "General" tab,
  2. Change "Theme" to dark
Metzgar answered 26/5, 2016 at 7:24 Comment(3)
this should be the top answer. Not a .CSS hack.Wintertime
Outdated. Use the answer from iM71Fringe
Now it's Edit->Preferences->Environment -> GeneralCarolann
D
62

I found some trick for your problem! Here you can see it: Habrahabr -- Redesigning Qt Creator by your hands (russian lang.)

According to that article, that trick is kind of not so dirty, but "hack" (probably it wouldn't harm your system, but it can leave some artifacts on your interface).

You don't need to patch something (there is possibility, but I don't recommend).

Main idea is to use stylesheet like this stylesheet.css:

// on Linux
qtcreator -stylesheet='.qt-stylesheet.css' 
// on Windows
[pathToQt]\QtCreator\bin\qtcreator.exe -stylesheet [pathToStyleSheet]

To get such effect: QtCreator before and after

To customize by your needs, you may need to read documentation: Qt Style Sheets Reference, Qt Style Sheets Examples and so on.

This wiki page is dedicated to custom Qt Creator styling.

P.S. If you'll got better stylesheet, share it, I'll be happy! :)


UPD (10.12.2014): Hopefully, now we can close this topic. Thanks, Simon G., Things have changed once again. Users may use custom themes since QtCreator 3.3. So hacky stylesheets are no longer needed.

Everyone can take a look at todays update: Qt 5.4 released. There you can find information that Qt 5.4, also comes with a brand new version of Qt Creator 3.3. Just take a look at official video at Youtube.

So, to apply dark theme you need go to "Tools" -> "Options" -> "Environment" -> "General" tab, and there you need to change "Theme".

See more information about its configuring here: Configuring Qt Creator.

Downe answered 18/10, 2012 at 8:37 Comment(10)
Has anybody had luck styling the Search Results, Compile Output, Application Output tabs, or General Messages panes?Coroneted
Did someone try that stylesheet.css with last qt creator? I have white background, no matter what editor theme is selected.Refined
How to use it on Mac?Minion
Fun thing, just tested the sheet provided here in QtCreator 3.1.2. The over all UI gets styled but the editor gets completly messed up no matter what editor style I select. Didn't care enough ATM to took for a fix though.Juniorjuniority
Ok, so things have changed a bit. Here is a css that works less bad with QtCreator 3.1.2 github.com/victorhaggqvist/qtcreator-styleJuniorjuniority
Things have changed once again. Users may use custom themes since QtCreator 3.3. So hacky stylesheets are no longer needed.Janson
QtCreator 3.3's dark color scheme is not supported yet by the new project wizard.. light gray on white background..Liggins
@SimonG. Good find, however the bottom panel (Application Output & Compile Output) is a dark grey background with black text...not so useful :(Ingres
Qt Creator version 3.5.1 says it fixed this issue.False
Downvoted to let the answer from iM71 be a bit higher rate compared to this outdated hack.Fringe
A
27

In newer versions of Qt Creator you can follow these simple steps:

  • Using Qt Creator 4.4.1: Tools > Options > Environment > Interface
  • Using Qt Creator 10.0.1: Edit > Preferences > Environment > Interface

From here you can change the theme to Flat Dark.

It will change the whole Qt Creator theme, not just the editor window.

enter image description here

Algolagnia answered 15/11, 2017 at 15:28 Comment(1)
Currently, as this comment is written, flat dark theme does not look good (at least not for my display). Try Project -> Build -> Build Environemnt -> Detail. My display shows all those environment variables in dark text on a dark background.Promptbook
K
18

Here is my dark theme (based on Darcula IntelliJ Theme):
https://github.com/mervick/Qt-Creator-Darcula


QT Creator Dark Color Scheme - Preview

Kong answered 4/5, 2015 at 21:42 Comment(3)
Hi, guy. How to do it on Mac?Punic
Thank you so much !Gyrose
Is here anyway to open the qtcreator by default with your theme without using command line ? the setting using ur Tools>>option>>text editor>>color scheme>> Dacula is not the same as running using command lineColbert
Z
7

QTcreator obeys your kde-wide configurations. If you choose "obsidian-coast" as the system-wide color scheme qt creator will be all dark as well. I know it is a partial solution but it works.

Zubkoff answered 22/8, 2010 at 17:37 Comment(1)
however if you use the help viewer (even new versions) the text that is not in tables will be black, which is a problem with main qt documentation. Other documentations such as the kde, gcc, and generic c++ documentation in .qch format works fine, noting that .qch is actually just a sqlite3 database of all the html files and stylesheets contained in it. You might be able to grab a style sheet out of there and redesign it using the !important keyword externally starting qtcreator with it's -stylesheet option (that flag seems to work on any other qt app as well as you consume QApplication propr)Bordeaux
N
3

My Dark Color scheme for QtCreator is at:

https://github.com/borzh/qt-creator-css/blob/master/qt-creator.css

To use with Vim (dark) scheme.

Hope it is useful for someone.

Newberry answered 29/8, 2014 at 16:48 Comment(3)
Installed but background becomes white when outside "highlight blocks" (background is always white for *.txt files). Do you use your CSS with Qt Creator 3.2 ? Yep I have Color Scheme = Vim (dark)Peculiarity
Sorry it's been a while since I used Qt Creator, I moved to XCode. If you fix it, please make a push request so I can merge it.Newberry
No worries I have just installed darcula and this is fine. Anyway I have upvoted your answer, thanks for sharing ;-)Peculiarity
L
2

I found a way to change the Application Output theme and everything that can't be edited from .css.

If you use osX:

  1. Navigate to your Qt install directory.
  2. Right click Qt Creator application and select "Show Package Contents"
  3. Copy the following file to your desktop> Contents/Resources/themes/dark.creatortheme or /default.creatortheme. Depending on if you are using dark theme or default theme.
  4. Edit the file in text editor.
  5. Under [Palette], there is a line that says error=ffff0000.
  6. Set a new color, save, and override the original file.
Lianaliane answered 9/10, 2015 at 22:6 Comment(0)
M
1

Linux, Qt Creator >= 3.4:

You could edit theese themes:

/usr/share/qtcreator/themes/default.creatortheme
/usr/share/qtcreator/themes/dark.creatortheme
Mccool answered 1/4, 2017 at 8:50 Comment(1)
What's the equivalent location on Windows?Doublure
F
0

Here is a theme that I copied all the important parts of the Visual Studio 2013 dark theme.

**Update 08/Sep/15 - Qt Creator 3.5.1/Qt 5.5.1 might have fixed the rest of Qt not being dark properly and hard to read.

False answered 29/9, 2015 at 21:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.