You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 15, 2024. It is now read-only.
*[x] Release translation (Qt Linguist `*.qt.ts` file) to `*.qm` file
40
+
*[x] Preview QML
41
+
*[x] Compile QRC (Qt Resource File) into Python file (require `pyrcc5` or `pyside2-rcc`)
39
42
40
43
## Requirements
41
44
42
45
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).
43
46
44
47
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`. Or, for Windows, you could find the binary of the tools in `C:\Qt\5.12.0\mingw73_64\bin` if you did not change the default path. You have to set the paths of tools in **Qt for Python** section in user settings of Visual Studio Code before using the commands provided by this extension.
45
48
46
-
## Command and Explorer Context Menu
49
+
## Caveat
47
50
48
-
> **Note**: All file generated by the following command would overwrite the existing files with the same name **without warning**.
49
-
50
-
### New Form (Qt Designer UI File)
51
-
52
-
* When: Any condition for command palette or the target in explorer context is a folder.
53
-
* Behavior: Create new UI file in Qt Designer.
54
-
55
-
### Edit Form (Qt Designer UI File)
56
-
57
-
* When: The file name extension of the target file in explorer context or the current document in the editor is `*.ui`.
58
-
* Behavior: Edit the UI file in Qt Designer.
59
-
60
-
### Edit Qt Linguist Translation File
61
-
62
-
* 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`.
63
-
* Behavior: Edit the `qt.ts` file in Qt Linguist.
64
-
65
-
### Release Qt Linguist Translation to QM File
66
-
67
-
* 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`.
68
-
* Behavior: Use `lrelease` to convert the `qt.ts` file into `*.qm` file.
69
-
70
-
### Preview QML
71
-
72
-
* When: The file name extension of the target file in explorer context or the current document in the editor is `*.qml`.
73
-
* Behavior: Use `qmlscene` to preview the QML file.
74
-
75
-
## Extension Settings
76
-
77
-
This extension contributes the following settings:
78
-
79
-
*`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`.
80
-
*`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`.
81
-
*`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`.
82
-
*`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`.
51
+
* All file generated by the following command would overwrite the existing files with the same name **without warning**.
"markdownDescription": "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` in Linux or `C:\\Qt\\5.12.0\\mingw73_64\\bin\\designer.exe` in Windows."
224
+
"markdownDescription": "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\"` in Linux or `\"C:\\Qt\\5.12.0\\mingw73_64\\bin\\designer.exe\"` in Windows."
147
225
},
148
226
"qtForPython.path.pyuic": {
149
227
"type": "string",
150
228
"default": "",
151
-
"markdownDescription": "The path of UI compiler of Qt for Python (PyQt5 or PySide2). For example, `pyuic5 -d -o ./out.py` for PyQt5 or `pyside2-uic -d -o ./out.py` for PySide2."
229
+
"markdownDescription": "The path of UI compiler of Qt for Python (PyQt5 or PySide2). For example, `pyuic5 -d -o ./out.py` for PyQt5 or `pyside2-uic -d -o ./out.py` for PySide2."
152
230
},
153
231
"qtForPython.path.pylupdate": {
154
232
"type": "string",
@@ -158,17 +236,17 @@
158
236
"qtForPython.path.linguist": {
159
237
"type": "string",
160
238
"default": "",
161
-
"markdownDescription": "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` in Linux or `C:\\Qt\\5.12.0\\mingw73_64\\bin\\linguist.exe` in Windows."
239
+
"markdownDescription": "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\"` in Linux or `\"C:\\Qt\\5.12.0\\mingw73_64\\bin\\linguist.exe\"` in Windows."
162
240
},
163
241
"qtForPython.path.lrelease": {
164
242
"type": "string",
165
243
"default": "",
166
-
"markdownDescription": "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` in Linux or `C:\\Qt\\5.12.0\\mingw73_64\\bin\\lrelease.exe -qm .\\out.qm` in Windows."
244
+
"markdownDescription": "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` in Linux or `\"C:\\Qt\\5.12.0\\mingw73_64\\bin\\lrelease.exe\" -qm .\\out.qm` in Windows."
167
245
},
168
246
"qtForPython.path.qmlscene": {
169
247
"type": "string",
170
248
"default": "",
171
-
"markdownDescription": "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` in Linux or `C:\\Qt\\5.12.0\\mingw73_64\\bin\\qmlscene.exe --verbose` in Windows."
249
+
"markdownDescription": "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` in Linux or `\"C:\\Qt\\5.12.0\\mingw73_64\\bin\\qmlscene.exe\" --verbose` in Windows."
0 commit comments