ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

qt creator and ROS

asked 2011-04-12 04:00:49 -0500

KoenBuys gravatar image

updated 2014-01-28 17:09:31 -0500

ngrennan gravatar image

I have a qt creator .pro file from which my makefile is generated, however now I want to include ROS packages in the project and have my project build in a rosmake kind of way of from the build command in QT Creator. In the project I also make use of a QT designer .ui file. Is there a script/tutorial how to use ROS together with QT? It's not mentioned on the IDE page. I found an old discussion here, but this consists out of modifying the CMake file, it isn't a portable solution.

edit retag flag offensive close merge delete


CMake will probably be the most useful solution. Why do you think this is not portable? CMake comes with full support for Qt, so if you wrap qmake it will all work fine.
AHornung gravatar image AHornung  ( 2011-04-12 07:59:02 -0500 )edit
Okay, so I've got a .pro file and a makefile from a qmake and a ros manifest + cmakelist file from a ros package and how do I continue from there on?
KoenBuys gravatar image KoenBuys  ( 2011-04-12 09:31:52 -0500 )edit
This probably qualifies more for an answer, so I'll give it a try...
AHornung gravatar image AHornung  ( 2011-04-12 09:46:43 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2011-04-12 13:15:10 -0500

Daniel Stonier gravatar image

updated 2011-04-12 13:19:37 -0500

Switching to qt-cmake development is the easiest way as that directly syncs with the way ros builds. The qt cmake module maintainer I've found is also very accessible to addressing problems whatever may arise (I had a few issues with mingw+qt).

Eros (nevermind that its about embedded/cross compiling) has a few python tools to help set up qt projects in the ros-cmake environment. You can either install eros or use these as a guide for your own packages.

The templates set up ui files and resources as well as sources. This tutorial gives you a picture of the end result (though as mentioned at the bottom, works just as well natively without doing all of the rostoolchain stuff.

For portablility, we're hoping that rosbuild2 (coming soon) will mean that this can be directly compiled via cmake on windows' msvc as well.

edit flag offensive delete link more

answered 2011-04-12 09:52:32 -0500

AHornung gravatar image

updated 2011-04-12 09:55:37 -0500

Have a look at the discussion thread you linked, Qt4_with_cmake, or this file for an example.

Essentially, CMakeLists.txt will be what you work on to add new files to the project instead of the .pro and makefile. CMake will then call qmake and whatever is needed to process your UI files. This worked great with Eclipse and the Qt-Designer plugin, so I bet it will also work with Qt Creator. The fact that you will also have ROS in your CMakeLists should not interfere in any way.

See this link for using Creator with a CMake project.

edit flag offensive delete link more

answered 2018-12-16 21:29:10 -0500

pavankumarbn gravatar image

I have developed a simple GUI to control drone using QtCreater, PyQT, and ROS. You can find it on this link . Also In this video ( ), you can find detailed information on the same.

edit flag offensive delete link more


Please don't post link-only answers, this leaves the answer to be not self-contained. Please update your answer with the all of the relevant information to answer the question.

jayess gravatar image jayess  ( 2019-01-05 12:13:28 -0500 )edit

Question Tools

1 follower


Asked: 2011-04-12 04:00:49 -0500

Seen: 5,148 times

Last updated: Dec 16 '18