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

Revision history [back]

click to hide/show revision 1
initial version

After conducting experiments on the answer provided by @Ranjit Kathiriya , I was able to find that the directory structure for ROS-Qt project and files is not compulsory but it is mandatory to have 4 kind of files:
1. main.cpp
2. mainwindow.cpp
3. mainwindow.h
4. mainwindow.ui
The names of above files can vary. It is mandatory to declare all files in CMakeLists.txt (they can be located in different folders or same).

In order to run the project the ui_mainwindow.h file is mandatory which is auto generated in build directory of catkin workspace if CMAKE_AUTOUIC macro is set in CMakeLists.txt.

Also there is no need to manually create 3 of the above mentioned 4 files. Once an empty project is created in Qt Creator go to:
FIle -> New File Or Project
Following window will appear, choose Qt under Files and Classes and then on right side panel choose Qt Designer Form Class, follow steps by clicking on choose and you can create files 2, 3 and 4.

image description