|
1 | | -# vscode-qt-for-python README |
| 1 | +# Visual Studio Code Extension Qt for Python |
2 | 2 |
|
3 | | -This is the README for your extension "vscode-qt-for-python". After writing up a brief description, we recommend including the following sections. |
| 3 | +A Visual Studio Code extension provides some common functionalities for PyQt5 and PySide2 with Qt Creator. |
4 | 4 |
|
5 | | -## Features |
| 5 | +| Qt Markup Language (`qml`) | Qt Style Sheets (`qss`) | Resource Collection Files (`qrc`) | |
| 6 | +|:---------------------------------------:|:---------------------------------------:|:---------------------------------------:| |
| 7 | +|  |  |  | |
6 | 8 |
|
7 | | -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. |
| 9 | +| `qmake` Files (`pro`) | Qt Linguist Translation (`qt.ts`) | QML Module Definition Files (`qmldir`) | |
| 10 | +|:---------------------------------------:|:----------------------------------------:|:------------------------------------------:| |
| 11 | +|  |  |  | |
8 | 12 |
|
9 | | -For example if there is an image subfolder under your extension project workspace: |
| 13 | +| Qt Markup Language (`*.qml`) | Qt Designer Form (`*.ui`) | Qt Linguist Translation (`*.qt.ts`) | |
| 14 | +|:-------------------------------------------:|:-------------------------------------------:|---------------------------------------------| |
| 15 | +|  |  |  | |
10 | 16 |
|
11 | | -\!\[feature X\]\(images/feature-x.png\) |
| 17 | +## Features |
12 | 18 |
|
13 | | -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. |
| 19 | +* [x] Qt Markup Language (`*.qml`) highlighting and snippets support |
| 20 | +* [x] QML Module Definition Files (`*.qmldir`) highlighting and snippets support |
| 21 | +* [x] Qt Style Sheets (`*.qss`) highlighting and snippets support |
| 22 | +* [x] Qt Linguist Translation (`*.qt.ts`) highlighting support (XML) |
| 23 | +* [x] Resource Collection Files (`*.qrc`) highlighting support (XML) |
| 24 | +* [x] Qt Designer Form (`*.ui`) highlighting support (XML) |
| 25 | +* [x] Qt Creator User Settings (`*.pro.user`) highlighting support (XML) |
| 26 | +* [x] `qmake` highlighting support |
| 27 | +* [x] New form (Qt Designer `*.ui` file) command |
| 28 | +* [x] Edit form (Qt Designer `*.ui` file) command |
| 29 | +* [x] Edit translation (Qt Linguist `*.qt.ts` file) |
| 30 | +* [x] Release translation (Qt Linguist `*.qt.ts` file) to `*.qm` file |
| 31 | +* [x] Preview QML |
14 | 32 |
|
15 | 33 | ## Requirements |
16 | 34 |
|
17 | | -If you have any requirements or dependencies, add a section describing those and how to install and configure them. |
18 | | - |
19 | | -## Extension Settings |
20 | | - |
21 | | -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. |
22 | | - |
23 | | -For example: |
| 35 | +This extension requires Qt Designer, Qt Linguist, Qt `lrelease` and Qt `qmlscene` for different features. You could install these tools by installing [Qt Creator](https://www.qt.io/download). |
24 | 36 |
|
25 | | -This extension contributes the following settings: |
26 | | - |
27 | | -* `myExtension.enable`: enable/disable this extension |
28 | | -* `myExtension.thing`: set to `blah` to do something |
| 37 | +After the installation, you could find the tools within the installing folder of Qt Creator in your computer. For example, if you install Qt Creator 5.12.0 in `/opt/Qt` in Linux, you could find out the binary of these tools in `/opt/Qt/5.12.0/gcc_64/bin`. You have to set the paths of tool in **Qt for Python** section in user settings of Visual Studio Code before using the commands provided by this extension. |
29 | 38 |
|
30 | | -## Known Issues |
| 39 | +## Commmand and Explorer Context Menu |
31 | 40 |
|
32 | | -Calling out known issues can help limit users opening duplicate issues against your extension. |
| 41 | +> **Note**: All file generated by the following command would overwrite the existing file with the same name **without warning**. |
33 | 42 |
|
34 | | -## Release Notes |
| 43 | +### New Form (Qt Designer UI File) |
35 | 44 |
|
36 | | -Users appreciate release notes as you update your extension. |
| 45 | +* When: Any condition for command palette or the target in explorer context is a folder. |
| 46 | +* Behavior: Create new UI file in Qt Designer. |
37 | 47 |
|
38 | | -### 1.0.0 |
| 48 | +### Edit Form (Qt Designer UI File) |
39 | 49 |
|
40 | | -Initial release of ... |
| 50 | +* When: The file name extension of the target file in explorer context or the current document in the editor is `*.ui`. |
| 51 | +* Behavior: Edit the UI file in Qt Designer. |
41 | 52 |
|
42 | | -### 1.0.1 |
| 53 | +### Edit Qt Linguist Translation File |
43 | 54 |
|
44 | | -Fixed issue #. |
| 55 | +* When: The file name extension of the target file in explorer context or the current document in the editor is `*.qt.ts` and the language is `xml`. |
| 56 | +* Behavior: Edit the `qt.ts` file in Qt Linguist. |
45 | 57 |
|
46 | | -### 1.1.0 |
| 58 | +### Release Qt Linguist Translation to QM File |
47 | 59 |
|
48 | | -Added features X, Y, and Z. |
| 60 | +* When: The file name extension of the target file in explorer context or the current document in the editor is `*.qt.ts` and the language is `xml`. |
| 61 | +* Behavior: Use `lrelease` to convert the `qt.ts` file into `*.qm` file. |
49 | 62 |
|
50 | | ------------------------------------------------------------------------------------------------------------ |
| 63 | +### Preview QML |
51 | 64 |
|
52 | | -## Working with Markdown |
| 65 | +* When: The file name extension of the target file in explorer context or the current document in the editor is `*.qml`. |
| 66 | +* Behavior: Use `qmlscene` to preview the QML file. |
53 | 67 |
|
54 | | -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: |
| 68 | +## Extension Settings |
55 | 69 |
|
56 | | -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) |
57 | | -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) |
58 | | -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets |
| 70 | +This extension contributes the following settings: |
59 | 71 |
|
60 | | -### For more information |
| 72 | +* `qtForPython.path.designer`: The path of Qt Designer with CLI arguments to create and edit form (`*.ui`) files. For example, `/opt/Qt/5.12.0/gcc_64/bin/designer`. |
| 73 | +* `qtForPython.path.linguist`: The path of Qt Linguist with CLI arguments to edit translation (`*.qt.ts`) files. For example, `/opt/Qt/5.12.0/gcc_64/bin/linguist`. |
| 74 | +* `qtForPython.path.lrelease`: The path of Qt lrelease with CLI arguments to edit translation (`*.qt.ts`) files. For example, `/opt/Qt/5.12.0/gcc_64/bin/lrelease -qm ./out.qm`. |
| 75 | +* `qtForPython.path.qmlscene`: The path of Qt QML Scene (`qmlscene`) with CLI arguments to preview QML (`*.qml`) files. For example, `/opt/Qt/5.12.0/gcc_64/bin/qmlscene --verbose`. |
61 | 76 |
|
62 | | -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) |
63 | | -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) |
| 77 | +## Release Notes |
64 | 78 |
|
65 | | -**Enjoy!** |
| 79 | +Please see the release notes in [CHANGELOG](CHANGELOG.md). |
0 commit comments