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.
answered 2011-04-12 18:15:10 -0500Daniel Stonier
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.
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.
Asked: 2011-04-12 09:00:49 -0500
Seen: 1,881 times
Last updated: Apr 12 '11