Frequently Asked Questions

This wiki highlights the frequently asked questions on the issue tracker.

  1. How to show empty folders?
  2. Are new files automaticly added to the CMakeLists.txt file?
  3. Warning: This file is not part of any project.?
  4. Environment variables in .bashrc are not loaded by Qt Creator.
  5. How do I set the C++ code style to match the ROS Style?

How to show empty folders?

By default Qt Creator hides empty folders. In the above image you can see that the workspace src folder is not shown. Under the project filters uncheck Hide Empty Directories.

../_images/show_empty_folders.png

Are new files automaticly added to the CMakeLists.txt file?

Currently it is the developers responsibility to edit the CMakeLists.txt file.

Warning: This file is not part of any project.?

This can be for several reason.

  1. The workspace has not been built from within Qt Creator. Specific flags are passed to cmake which create specific project files which the IDE can parse to build a code model.
  2. The file or files have not been added to the CMakeLists.txt file followed by a build from within Qt Creator.
  3. Sometime is persist event if you address the previous items, but if code following is working then it should be ignored.

Environment variables in .bashrc are not loaded by Qt Creator.

The .bashrc is loaded by bash terminals and is not used by applications. In order for applications to get user defined environment variables you have the two known option below.

  1. The environment variables can be added to the build configuration in Qt Creator of the project. This will be required for every new project created in Qt Creator.
  2. The environment variables can be added to the .profile file in the users home directory. This is only required once.

How do I set the C++ code style to match the ROS Style?

  1. First, find the Tools tab on the upper toolbar.

  2. From the Tools tab, select Options.

    ../_images/navigate_to_options_tab.png
  3. In the window that pops up, select C++ in the menu on the left.

  4. Select the Code Style tab near the top of the pop-up window.

  5. Select ROS from the drop down menu.

    ../_images/cxx_style_window.png
  6. Select ‘OK’ at the bottom right to apply settings and return to coding!