Skip to content

Qt Creator, CMake and C++/Qt Development

I have been experimenting with Qt Creator since the first release. I have always preferred a minimal editor for development work, with my main needs being good syntax highlighting, the ability to switch between different files quickly and something that stays out of my way as much as possible. Previously I had used Vim, Kate and several konsole instances the majority of the time.

Recently I have been looking for something with better integration, and so had been slowly keeping an eye out for a lightweight IDE. My main requirements were something lightweight, good C++ support, ideally good Qt support and CMake integration. Over the weekend I tried the latest Qt Creator 1.1 release and was really impressed.

Seb Ruiz made a great post on Qt Creator 1.1 that summed up many of my thoughts, and gave a quick walkthrough. It was not immediately obvious how to import a CMake project, I was looking for an import project option. All that is necessary is to go to file and open. You can then open the base CMakeLists.txt file for your project and the CMake plugin will do the rest.

From there on in you get great integration with the build system, version control (Git and friends), and your friendly GDB debugger. Under projects you might want to quickly add -j5 (if you are lucky enough to have a quad core machine) to the additional arguments input for make, and select the main executable target for your project if you also have several other executable targets (unit tests etc).

The first time you debug a project you will be prompted to build the Qt debugger helper. Then the integration with GDB really wins over using GDB directly, or using ddd which I had been using more and more recently. I would highly recommend trying Qt Creator if you are looking for a lightweight, cross platform IDE. There are certainly other great IDEs out there, but I think that Qt Creator is a great fit for my development style (and may be yours).


No Trackbacks


Display comments as Linear | Threaded

RealNC on :

RealNCYep, Qt Creator is definitely a win. Quick, small, elegant, easy to learn and just does the job without bloat. Been using KDevelop for a long time and I find myself firing up Qt Creator more and more often as of late.

Abel gaius on :

Abel gaiusHi Marcus, I am pretty new to Qt developemnt. I have to develope application for a E-reader book. which has ARM controller. How do i start using QT .. I am feling pretty nervous.. Its Totally new to me.. PLS help....
SOme Guides and Beginner expllained with an Example.. PLSS>>>S

Marcus D. Hanwell on :

Marcus D. HanwellI was really swamped, and this comment slipped through the cracks. I hope things have gone well, my best advice is to buy a book or two, and use the excellent online documentation. I haven't done any embedded development yet, and so couldn't really help much there.

Good luck! Qt Creator keeps getting better and better. It certainly has support for embedded development.

Joao Gomes on :

Joao GomesHi Marcus!

I'm new to qt and I'm having trouble using the debugger in an Cmake project.
Basically I can compile and run the project inside qt creator, but when I run in debug mode it doesn't stop in any of the breakpoints I've used. Since you have experience with Qt+CMake I thought you might have been through this before and there fore could help me..

Best regards,


Marcus D. Hanwell on :

Marcus D. HanwellYou probably need to put it into Debug mode and recompile. You can run cmake-gui in the build directory of your project, look for the entry named CMAKE_BUILD_TYPE and type Debug in there, press enter and then hit the Configure button followed by the Generate button. After that you would need to rebuild by clicking build in Qt Creator.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Form options