QT Creator Issues (code completion)
Hoping someone can impart some QT Creator knowledge here...
After previously trying Eclipse and eventually getting it to work, I have decided to try QT Creator as many people have suggested because of its ease of setup (I am going to be recommending an IDE for other developers to use on my project).
This page: http://www.ros.org/wiki/IDEs indicates that there's very little setup necessary to get QT Creator working with ROS. These are the basic steps I followed:
1) Run qtcreator from the command line 2) Click File->Open file or project 3) Select CMakeLists.txt file in project 4) Click the "Run Cmake" button and finish.
Here are the issues that occur with no other modifications.
1) Code completion does not work with the boost threading library (only boost library I've tried) even though in my CMakeLists.txt file I have (compiles and runs fine):
rosbuild_add_boost_directories() rosbuild_link_boost(myprogram, thread)
In Eclipse I would manually add these include directories for boost in the Eclipse GUI. But from what I'm understanding, QTCreator with a existing cmake project does everything from that CMakeLists file. I am not seeing a way to manually add references/includes in qtcreator.
2) Code completion does not work correctly for another third party library. Again, it compiles and runs fine, but if I specify the directory of the libraries header files:
include_directories(~/include/directory/)
and then create a variable such as
objecttype x;
Typing "x." I expect to see a list of the variables inside that class for me to choose from. But actually, I get a list of ALL the variables from ALL classes defined anywhere inside the specified include_directories folder. There are a lot of header files there. This may be an issue with how I am writing the cmake file? CMake is not my favorite thing in the world.
3) (minor) qtcreator DOES find my custom defined messages and the code completion works, however the .msg files I've created are not listed in the "Projects" file list. Is there a way i should specify in the cmake file that these files are including in my project?
4) (question) When building a project with qtcreator, it seems to just call "make". Do I not need to specify it to call "rosmake"?
This may be too many questions for one question, but I thought it might be nice to keep them all together.
I moved back to eclipse for Qt-ROS prj dev because of ease of setting (ironic since we're saying the opposite). I now use QtC only for Qt Designer for GUI design. Catch is to us qt_ros to generate CMakeLists.txt http://goo.gl/aaR5F, which takes care of Qt files & works really well with
rosmake
.But qt_ros is for actually developing QT applications? I was just hoping to use QT Creator for a c++ development environment. A lot of the things in QT Creator are nice (except for the issues i have). I am kind of tired of eclipse, but I may have to switch back to it.
I see (didn't know you're not building Qt app). Might be worth trying. But because of compatibility with rosmake, I still recommend eclipse maybe after you've experienced both. See also http://answers.ros.org/question/39815/eclipse-calling-make-not-rosmake/