Qt Creator color scheme (MSVS2012 style!)

Hello minions!

[A little note first]. It seems it has taken forever for me to publish this post. In actual fact, it was actually finished back many moons ago. What happened was that, for some god forsaken reason, there appeared to have been a roll back. A little while after I published the article, the article was unpublished and the saved drafts rolled back to when I was only half way through writing this. This totally put me off, and so I basically went away from WordPress for some time, until now.

Any how, lets move on to the actual stuff.

Ever since I got my hands on the new Microsoft Visual Studio 2012 and all it’s goodies and junks, I’ve fallen in love with one thing. It’s dark theme!

vs2012_colorTheme_example

It’s the next best thing for those who have super-uber-sensitive eyes. Besides chicken cooked in any possible yummy ways.

vs2012_colorTheme_option its enabled here.

Now. Along side C++, I’m also a big fan of the Qt framework (its pronounced ‘cute’ apparently, but I like to call it Q.T.), and it’s ways, and I’ve been learning it with the book “An Introduction to Design Patterns in C++ with Qt” 2nd ed, by Ezust. A great read to add to my newbie C++ and design patterns knowledge, alongside the obvious Qt materials.

Anyway, Qt comes with its own full feature, cross platform IDE, the Qt Creator (wiki link). It natively integrates with the Qt framework and I’ve been using it the past couple weeks.

Moving back on topic. The default color schemes for the text editor’s syntax highlighting are pretty ugly if you ask me. Thanks to my mega laziness, I’ve never bothered to fiddle with it, right until a couple days when I’ve finally bite the bullet, and decided to have a go at it!

qt_option setting the individual colour values

Screen Shot 2013-02-13 at 8.22.04 PMvs2012_colorTheme_example ta da, the final product!

Now, here comes the hardest part. locating where the color scheme file is placed/stored was a massive pain in the buttock, especially on the Mac.
Windows users  can find theirs in:
Users\<user name>\AppData\Roaming\QtProject\qtcreator\styles

It’s a bit trickier for Mac users. You would  have to first tell finder to show all the hidden files. Then you can go to here:
/<usr/mac name>/.config/QtProject/qtcreator/styles

There’s a couple tutorial that you can find on Google on how to get finder to show hidden files, so i won’t post it here.

Now of course, if you look closely and compare it with VS2012’s dark theme, they are not 100% the same. Beside the different ways the 2 IDE’s identify different syntax elements, I’ve added some personal touch to give more highlight and avoided as much white as possible.

At last, here’s the link to the final XML file for the color scheme: [click me!]

Ciao now.

[UPDATE: 2014/08/23]

  • primitive type colour has been set to blue as it is in MSVS.
  • doxygen comment colour has been set to the same green as regular comments but a little lighter.

15 Replies to “Qt Creator color scheme (MSVS2012 style!)”

  1. Thank you.
    Being way much lazier than you. I thought I would look around the internet or go back to default.
    Problem with the default is that it is colourless in places that you expect colour.

    1. I had a quick look and couldn’t find anything. I don’t think you can :P. I could be wrong though.

      Why do you want to have a background image?

  2. I’ll right away seize your rss as I can not in finding your
    email subscription hyperlink or e-newsletter service.

    Do you have any? Kindly let me realize in order
    that I may subscribe. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.