Hello @surajj4837,
notation$ tree .
.
├── CMakeLists.txt
├── include
│ └── ai_robotic_auto_annotation
│ ├── clickable.h
│ ├── clickablelabel.h
│ ├── mainwindow.h
│ └── my_qlabel.h
├── launch
│ └── ai_robotic_auto_annotation.launch
├── package.xml
├── resources
│ ├── about.png
│ ├── ai_icon.png
│ ├── annotation.png
│ ├── changedir.png
│ ├── close.png
│ ├── create.png
│ ├── edit.png
│ ├── exit.png
│ ├── icon.png
│ ├── model.png
│ ├── next.png
│ ├── open_directory.png
│ ├── open_single.png
│ ├── previous.png
│ ├── redo.png
│ ├── remove.png
│ ├── reset.png
│ ├── save.png
│ ├── train.png
│ ├── tutorials.png
│ └── undu.png
├── resources.qrc
├── resources.qrc.autosave
└── src
├── ai_robotic_auto_annotation.pro
├── clickable.cpp
├── clickablelabel.cpp
├── main.cpp
├── mainwindow.cpp
├── mainwindow.ui
└── my_qlabel.cpp
5 directories, 40 files
This was the structure of my one of the qt with ros project.
Do we have to create other folders and files manually?
Yes, You have to create it manually which is required for ros support. For example, Package.xml and Cmake.txt
What about .ui file?
You can add it anywhere you like, Just make sure to add a path to Cmake.txt
set(QT_SOURCES
#Main Window
src/main.cpp
src/mainwindow.cpp
src/my_qlabel.cpp
src/clickable.cpp
src/clickablelabel.cpp
# Header file paths
include/ai_robotic_auto_annotation/mainwindow.h
include/ai_robotic_auto_annotation/my_qlabel.h
include/ai_robotic_auto_annotation/clickablelabel.h
include/ai_robotic_auto_annotation/clickable.h
# UI path
src/mainwindow.ui
)
For the Resource file, if you have any:
find_package(Qt5 COMPONENTS Core Gui Widgets)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources.qrc)
QT5_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
I think it should have been created by the Qt Creator, What am I missing?
You need to make sure that you are including each file's path in your Cmake.txt, I think that configuration is important.
And You are also adding dependices to the package.xml file.
<build_depend>qt_build</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>libqt4-dev</build_depend>
<exec_depend>qt_build</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>libqt4-dev</exec_depend>
I hope this helps, if you have any issues feel free to drop a comment. If you want QT -> ROS using noetic then Tell me I will upload it for you.