Enable QML (Qt Modeling Language) syntax highlight and code completion in PyCharm.
Syntax highlight
Code completion
-
Download pycharm-qml-keywords-highlight.md
-
Open PyCharm settings - Editor - File Types, click the 'add' button. You will see the dialog pane
-
Enable options like below
-
Open the downloaded file, copy its content, paste to PyCharm dialog pane like below
-
And add
*.qml
file types -
Now you can see the code highlighted in .qml ^_^
- The source keywords are extracted from Qt 5.15. Be notice that some modules and properties are not available in Qt 6.0. You may find the difference by checking Qt offical documentation.
- The code completion is not perfect, since it always dumps all matched keywords as you typed, regardless which module or which component you're using.
See Developer Guide.