0
$\begingroup$

Rosanswers logo

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.


Originally posted by KoenBuys on ROS Answers with karma: 2314 on 2011-04-12

Post score: 3


Original comments

Comment by AHornung on 2011-04-12:
This probably qualifies more for an answer, so I'll give it a try...

Comment by KoenBuys on 2011-04-12:
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?

Comment by AHornung on 2011-04-12:
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.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Daniel Stonier with karma: 3170 on 2011-04-12

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by AHornung with karma: 5904 on 2011-04-12

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.