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

Qt 5 for ROS melodic

asked 2019-11-07 02:52:29 -0500

prex gravatar image

updated 2019-11-07 09:28:41 -0500

I'm wondering about the proper way to get Qt 5 for ROS melodic on Ubuntu 18.04. I searched for hours but couldn't find any recent tutorials. Last year, I developed this package where I used catkin_create_qt_pkg with qt_create and depending on qt_build and libqt4-dev. Since these packages are not available for ROS melodic, I can not compile the package anymore.

I've found and installed the following package: qt_gui, but without any hint what it does. I assume the qt_gui_cpp package installs Qt 5 and creates the bindings. Can someone give me an overview of what is needed and what these packages do? Is there a recent example for the package.xml and CMakeLists out there? I assume the source code is the same.

I installed the ROS Qt Creator Plug-in 4.9.2, but I assume this does just install a "ROS-ready" IDE without any Qt libraries, right?

I'm also wondering about the differences between ros-melodic-qt-gui, ros-melodic-libqt and ros-melodic-qt.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2019-11-08 04:59:44 -0500

prex gravatar image

updated 2019-11-10 12:07:05 -0500

Needed to make some changes to make the old Qt4 ROS Kinetic GUI compile with Qt5 ROS Melodic. These were:

It's now using only "non-ROS" Qt libraries.

I made a package template here:

edit flag offensive delete link more


Thank you very much! Using the CMake.txt file from your Github repo help us a lot!

PanMav gravatar image PanMav  ( 2020-02-20 02:31:39 -0500 )edit

answered 2021-03-22 14:54:22 -0500

alexspi13 gravatar image

I have create this template. Hope that will help.

edit flag offensive delete link more

answered 2019-11-07 03:11:39 -0500

LeonhardEuler337 gravatar image

updated 2019-11-07 03:12:37 -0500

I believe I faced the same issue and solved it here. Maybe try changing the macros to Qt5?

edit flag offensive delete link more


The packages seem to be available. There is ros-melodic-qt-gui and there is ros-melodic-libqt. I just don't see how they are used...

prex gravatar image prex  ( 2019-11-07 07:38:24 -0500 )edit

Question Tools



Asked: 2019-11-07 02:52:29 -0500

Seen: 3,432 times

Last updated: Mar 22 '21