Always run qtcreator from terminal to source the ROS environmental variable
- Bugfix: QtCreator 4 with Ubuntu 20.04
- QtCreator 4.11 running on Ubuntu 20.04 has a known bug that affects semantic highlighting.
- To fix it go to Help->About plugins and uncheck "ClangCodeModel"
Please set "Tab size" and "Indent size" equal to 2 in Tools->Options->Text Editor->Behavior and "Backspace indentation" to None. This helps portability of the indentation. In Tools->Options->C++ import "good_man.xml"
There are two methods to correctly import a package, in both cases you have to compile the package once from terminal before importing the package.
-
Click on Tools->options
-
Select Build & Run
-
In Default build directory, set /home/user/projects/[WORKSPACE]/build/%{CurrentProject:Name} where [WORKSPACE] is the workspace name of the package you want to open.
-
open the CMakeLists.txt file of the package
-
open the CMakeLists.txt file of the package
-
in Configure project window, unselect "Desktop"
-
in Configure project window scroll down to find "Import build from build"
-
click on browse and select the build directory or the package /home/user/projects/[WORKSPACE]/build/[CurrentProjecName]
-
click on import
First, open Qtcreator and change the default build directory:
- Click on Tools->options
- Select Build & Run
- In Default build directory, set /home/user/projects/[WORKSPACE]/build/%{CurrentProject:Name} where [WORKSPACE] is the workspace name of the package you want to open.
When you want to import a package make sure you have already compiled it. Then, open Qtcreator:
- File -> open file or project and select the CMakeLists.txt file of the package
- Select Import Existing Build and select the package in the build folder of the workspace /home/user/projects/[WORKSPACE]/build/[CurrentProjecName]
-In Edit build configuration change to Debug or Release depending on the variable CMAKE_BUILD_TYPE set in the CMakeLists.txt file. Note: the two fields must coincide
- Now you can go to edit tab to work with your package