

#Qt creator for python code
Since all the extensions run in the same embedded Python, there is a good deal of code devoted to making sure extensions seem isolated, as well as setting the appropriate sys.path for each extension. My main design goal was to make Python extensions 'feel' as if they were normal Python scripts, run from within their extension directory. Python extensions are nothing but a directory containing a main.py file, which represents the entry point of the extension. For now, there is one example of such a library available for the Project Explorer plugin. These libraries will eventually be provided for all plugins maintained by the QtCompany. To circumvent this problem, any other QtCreator plugin may provide an additional library, which is then dynamically loaded by the Python extensions plugin as necessary. This is quite a harsh restriction on the bindings we can use. Thus, we can only expose bindings for the Core plugin and things like the Utils library directly without incurring dependencies. Plugins in QtCreator can be disabled by the user. This means, that on top of all the QtCreator specific bindings, anything from Qt for Python is also available from Python. To generate the bindings for QtCreators APIs, I used the same tool.
#Qt creator for python generator
To do this, it uses a binding generator called Shiboken. This project enables developers to create Qt applications in Python by generating Python bindings for Qt's C++ code. Some of you may be familiar with Qt for Python.

So, what exactly do the Python extensions do? Well, the goal is to eventually be able to do about anything a native C++ plugin could do. During my time here, I have worked on enabling Python extensibility for the QtCreator and I am happy to announce, that a first proof of concept version is available today! Then you should have PyUic connected as well.Hello world! My name is Tilman and I have been an intern with The Qt Company in Berlin for the last few weeks.

Select the created tool and fill the fields on the right: Then, select the created category and click Add->Add Tool to create a new tool - RunPy for example.

Click Add->Add category and create a new category (for example, Python). Open Qt Creator and go to Tools->Options->Environment->External Tools. Running scripts requires some configuration (I used this tutorial). It also has syntax highlighting, but it lacks more complex features such as autocomplete. Currently, Qt Creator allows you to create Python files (not projects) and run them.
