2

I just install Qt Creator on Ubuntu for python GUI coding.

Can you please guide me that what steps should I follow to start python coding on QT Creator in Ubuntu environment.

1 Answer 1

2

Currently, Qt Creator allows you to create Python files (not projects) and run them. It also has syntax highlighting, but it lacks more complex features such as autocomplete.

Running scripts requires some configuration (I used this tutorial). Open Qt Creator and go to Tools->Options->Environment->External Tools. Click Add->Add category and create a new category (for example, Python). Then, select the created category and click Add->Add Tool to create a new tool - RunPy for example. Select the created tool and fill the fields on the right:

  1. Description - any value
  2. Executable - path to python.exe
  3. Arguments - %{CurrentDocument:FilePath}
  4. Working directory - %{CurrentDocument:Path}

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

how do I add Executable file in ubuntu
It's the same as @Fahdkalis wrote but easier since QtCreator also considers the PATH variable thus writing "python" (without the quotation marks) in the Executable-field will be sufficient to run it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.