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

How can I use Qt5 with ROS kinetic?

asked 2017-12-02 14:19:17 -0500

Zenzu gravatar image

updated 2017-12-02 14:20:17 -0500

Hi guys, I am a beginner with ROS and I want to do GUI for control my robotic arm. I think that I can use Qt5 in ROS without any plugins or changing some settings in QtCreator. I want to test a simple GUI with "Hello world" button but I have no idea how to do CMakeLists.txt and package.xml for my package. Can you show me how should I do CMakeLists.txt and package.xml? Thank you

Here is my package's path:


  • gui.cpp
  • CMakeLists.txt
  • package.xml

I have no idea if it works but here is my idea of simple "Hello world button" program gui.cpp:

#include <QApplication>
#include <QPushButton>
#include <ros/ros.h>

int main(int argc, char **argv){
   ros::init(argc, argv, "gui");
   ros::NodeHandle nh;
   QApplication app (argc, argv);

   QPushButton button ("Hello world !");;

  return app.exec();
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-04 02:59:00 -0500

rastaxe gravatar image

You can use roscreate-qt-pkg, it is very easy.

edit flag offensive delete link more

Question Tools



Asked: 2017-12-02 14:15:40 -0500

Seen: 1,223 times

Last updated: Dec 04 '17