Run Qt Creator from the command line | Qt Creator Manual

- Qt Creator Manual
- Run Qt Creator from the command line
- Qt Creator Manual 13.0.1

How To

# Run Qt Creator from the command line

You can start Qt Creator and specify some options from the command line. For example, you can open a file to any line and column.

To use command-line options, enter the following command in the directory that contains the Qt Creator executable or specify the path to Qt Creator as a part of the command:

     qtcreator [option] [filename[:line_number[:column_number]]]

Note: You can use either a colon (:) or a plus sign (+) as a separator between the filename and line number and the line number and the column number. You can also use a space between the separator and the line number.

## Examples of CLI commands

On Windows:

- `C:\qtcreator\bin>qtcreator -help`
- `C:\qtcreator\bin>qtcreator C:\TextFinder\textfinder.cpp:100:2`
- `C:\qtcreator\bin>qtcreator C:\TextFinder\textfinder.cpp +100+2`

On macOS:

- `Qt\ Creator.app/Contents/MacOS/Qt\ Creator -help`

## Open a project from a directory

To open a project that is located in a particular directory, you can pass on the directory name as a command-line argument. Qt Creator looks for a session that matches the directory name and loads it. Or it looks for a project file in the directory and opens it.

For example, on Windows:

`C:\qtcreator\bin>qtcreator.exe C:\Examples\alarms`

See also Command-Line Options.

How To