Thank you adobke! With your help I managed to get the Template from ttps://github.com/stonier/qt_ros/tree/groovy-devel/qt_create/src/qt_create/templates/qt-ros
After a catkin_make over it, also the catkin_make_qt_pkg promt is available now.
I created a qt_pkg with name test and opened it as usual with QT. Cmake ran succesfully, but when I try to run the code without having anything added or changed, the following errors pop up.
As the template is for Qt4, this might be the problem, because I am using Qt5, but don't really know, what I have to change in cmakelists.txt to get rid of the errors.
01:09:53: Führe Schritte für Projekt test aus...
01:09:53: Starte "/usr/bin/make"
[ 10%] Generating include/test/moc_qnode.cxx
[ 20%] Generating qrc_images.cxx
[ 30%] Generating ui_main_window.h
[ 40%] Generating include/test/moc_main_window.cxx
Scanning dependencies of target test
[ 50%] Building CXX object CMakeFiles/test.dir/src/main_window.cpp.o
In file included from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qnamespace.h:45:0,
from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobjectdefs.h:45,
from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qobject.h:47,
from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qabstractanimation.h:45,
from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/QtCore:4,
from /home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtGui/QtGui:4,
from /home/mmm/catkin_ws/test/src/main_window.cpp:12:
/home/mmm/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qglobal.h:1079:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
/home/mmm/catkin_ws/test/src/main_window.cpp:13:23: fatal error: QMessageBox: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/test.dir/src/main_window.cpp.o] Error 1
make[1]: *** [CMakeFiles/test.dir/all] Error 2
make: *** [all] Error 2
01:09:55: Der Prozess "/usr/bin/make" wurde mit dem Rückgabewert 2 beendet.
Error while building/deploying project test (kit: Desktop Qt 5.0.1 GCC 64bit)
Bei der Ausführung von Schritt 'Make'
#
#
UPDATE:
#
#
I could fix the first error by adding "add_definitions(-fPIC)" to the cmakelists.txt.
The next error I got was about missing files like <qmessagebox> could be solved by adding the specific "path INCLUDE_DIRECTORIES( "/usr/include/qt4" )".
Now there are a lot of new errors I don't really understand:
22:13:49: Führe Schritte für Projekt test aus...
22:13:49: Starte "/usr/bin/make"
-- Using CATKIN_DEVEL_PREFIX: /home/mmm/Dropbox/gesture/bureau/catkin_ws/test-build/devel
-- Using CMAKE_PREFIX_PATH: /home/mmm/Dropbox/gesture/bureau/catkin_ws/devel;/home/mmm/catkin_ws/devel;/opt/ros/groovy
-- This workspace overlays: /home/mmm/Dropbox/gesture/bureau/catkin_ws/devel;/home/mmm/catkin_ws/devel;/opt/ros/groovy
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using CATKIN_TEST_RESULTS_DIR: /home ...
(more)