Qt as IDE for ROOT

Hello everyone,

I am just starting with ROOT, so I guess you all know how challenging can be, at least, it’s been my case! I was wondering if someone has tried to use Qt as an IDE for ROOT and if yes, could you please shed some light on how to do this process??

I’d appreciate all your possible help!!
Thanks a lot in advance!


Qt is a framework for many things, but it is not an IDE.

Are you talking about “Qt Creator”? If you have a working cmake project, you can just open the CMakeLists.txt and it works perfectly (I don’t remember, probably I had to add an include path for root or source thisroot.sh first?) Anyway, it works.

You can also try KDevelop 5. It is also Qt based.

If you want non-Qt IDEs, try Visual Studio Code (with C++ IntelliSense extension) and/or Eclipse (with CDT).

It is up to you what you prefer. You need to know your editor anyway.

Usually the only thing you need to do is point the IDE to the ROOT header file include path.


Thanks a lot for your reply. Sorry for not being precise, yes, I mean Qt Creator. I have worked with Qt creator before, coding own programs, and I had to include some external libraries and includes in the project. However, Root uses a large number of libraries and to include them by hand doesn’t look reasonable. I have a local installation of Root, so I guess I have to give both, the include and the library path.

Can you tell me how to do this …

Usually the only thing you need to do is point the IDE to the ROOT header file include path.

for all the root libraries and includes?? is this even possible??



Hi Arturo,
after installation, all libraries are in $ROOTSYS/lib and all headers are in $ROOTSYS/include
where $ROOTSYS is the path to your ROOT installation.


Thank for the reply, I am aware of this, by doing
root-config --libs
root-config --cflags I can find where they are. The question would be, how to let Qt Creator know where they are. Any idea?

Thanks once more!

this is more a QtCreator question at this point, but a quick google search brings up the editor’s guide:

and a stackoverflow answer:

It seems you need to edit your *.pro project file to add the relevant directories to the INCLUDEPATH and LIBS variables.

Hope this helps.

I do it like this:

  1. Create a new plain C++ project with CMake
  2. Quit QtCreator
  3. source thisroot.sh
  4. mkdir project/cmake/Modules directory
  5. copy root/etc/cmake/FindROOT.cmake to your cmake/Modules directory
  6. Modify CMakeLists, add something like this
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Wextra")


find_package(ROOT REQUIRED)
include_directories(SYSTEM ${ROOT_INCLUDE_DIR})

And for your executable, add target_link_libraries(your_executable ${ROOT_LIBRARIES})

Then restart qtcreator from the shell where you have already sourced thisroot.sh and be happy.

Hi again,

It worked, I mean, now it recognizes everything and does the build and debug without problems. However, I think there is still something I’m missing. I’m not getting any “ROOT output”, like the plots. I used this code here https://root.cern.ch/doc/master/candledecay_8C.html and as I said, everything worked except by the fact that nothing is shown.

I have the feeling that at some point I am not calling ROOT, like @behrenhoff quoted in his post. Do you have an idea?

Thanks to both!

maybe this answer can help:


1 Like

Hi Enrico,

It worked!!! Thanks a lot!!!



You can check out here how to setup QtCreator IDE to build and debug ROOT scripts here: