QT Creator

Qt Creator is a free, open source IDE for all desktop platforms.

Projekt importieren

  • From the Qt Creator's main screen select New Project > Import Project > Import Existing Project.
../../../_images/qtcreator-new-project.png
  • Under Location select the Godot root folder.
../../../_images/qtcreator-set-project-path.png
  • Hier kannst du wählen welche Verzeichnisse und Dateien für das Projekt sichtbar sind. C/C++ Dateien werden automatisch hinzugefügt. Potentiell nützliche Ergänzungen: *.py für buildsystem Dateien, *.java für Android Entwicklung, *.mm für MacOS. Klicke "Next".
../../../_images/qtcreator-apply-import-filter.png

Bemerkung

You can change this configuration later by right-clicking on your project and selecting the Edit Files... option.

../../../_images/qtcreator-edit-files-menu.png
  • Finish the import.
  • Open the project_name.includes file and add a line containing . to it to correctly enable the code completion.
../../../_images/qtcreator-project-name-includes.png
  • From the left-side menu select Projects and open the Build tab.
  • Delete the predefined make build step.
../../../_images/qtcreator-projects-build.png
  • Click Add Build Step > Custom Process Step to add a new build step with the following settings:

    Befehl scons
    Arguments Siehe Einführung in das Buildsystem für eine komplette Liste aller Argumente.
../../../_images/qtcreator-set-scons-command.png

Bemerkung

If the build fails with Could not start process "scons", it can mean that scons is not in your PATH environment variable. In this case, you'll have to specify the full path to the SCons binary.

Debuggen des Projekts

  • From the left-side menu select Projects and open the Run tab.
  • Under Executable specify the path to your executable located in the <Godot root directory>/bin folder. The name depends on your build configuration, e.g. godot.x11.tools.64 for 64-bit X11 platform with tools enabled. You can use %{buildDir} to reference the project root, e.g: %{buildDir}/bin/godot.x11.opt.tools.64.
  • If you want to run a specific project, specify its root folder under Working directory.
  • If you want to run the editor, add -e to the Command line arguments field.
../../../_images/qtcreator-run-command.png

To learn more about command line arguments, refer to the command line tutorial.

Konfiguration des Codestils

Developers must follow the project's code style and the IDE should help them follow it. By default, Qt Creator uses spaces for indentation which doesn't match the Godot code style guidelines. You can change this behavior by changing the Code Style in Tools > Options > C++.

../../../_images/qtcreator-options-cpp.png

Click on Edit to change the current settings, then click on Copy Built-in Code Style button to set a new code style. Set a name for it (e.g. Godot) and change the Tab policy to be Tabs Only.

../../../_images/qtcreator-edit-codestyle.png

Wenn Sie auf Probleme stoßen, bitten Sie um Hilfe in einem von Godots Community-Kanälen.