[Interest] Python support in QtCreator 4.9
jhihn at gmx.com
Tue Mar 5 16:37:34 CET 2019
I was just taking a look at the beta, and am sharing my findings.
1. it looks like there isn't a way to import an existing python project?
1a. With an existing project how do I configure a .pyproject file, including specify the file with main / QApplication / entry point?
I cannot find any documentation on the file format.
2. I also created and selected the default Qt for Python - Window project and hit run, and I got:
15:25:00: Starting /usr/bin/python /Users/jhihn/Projects/test_pythonwindow/main.py...
Traceback (most recent call last):
File "/Users/jhihn/Projects/test_pythonwindow/main.py", line 3, in <module>
from PySide2.QtWidgets import QApplication, QMainWindow
ImportError: No module named PySide2.QtWidgets
15:25:00: /usr/bin/python exited with code 1
But if I run it from the command line it works:
python main.py # works
3. Starting QtCreator is slow. I get a beach ball and then a Secchi disk. Takes about 10 seconds.
4. Unfortunately all python projects will be called "main" in the project explorer.
Maybe the entry point should be $1.py where $1 is the name of the directory? i.e. test_pythonwindow
5. How do I specify python3 for a project? It seems to default to python 2?
Python 2 will be dead in 2020. Also, I have python code that uses async/await, so I need Python3
More information about the Interest