- 在Visual Studio Code安裝PYQT Integration的擴充功能
- 安裝PYQT Integration擴充功能後,將會增加下列功能,或更多,例如:
從VS code直接開啟 designer.exe 新增 ui form,在VS Code下預覽 ui form ...
PYQT: New Form Open designer PYQT: Edit In Designer Open designer with current ui form PYQT: Preview Preview current ui form PYQT: Compile Form Compile ui form to path defined in "pyqt-integration.pyuic.compile.filepath" PYQT: Compile Resource Compile qrc file to path defined in "pyqt-integration.pyrcc.compile.filepath" PYQT: Generate Translation File (.ts) Compile UI file (.py) to translation file with path defined in "pyqt-integration.pylupdate.compile.filepath"
Compile .pro filePYQT: Open With Qt Linguist Open with Qt Linguist for translation file (.ts) - 如果從 VS Code,無法正常啟動 designer.exe 或 pyuic5 ...,可以透過擴充延伸模組設定,指定正確的路徑、檔名 ...
- 以Qtdesigner這個設定項目為例,designer.exe,通常都是放在,Anaconda3安裝目錄的\Lib\site-packages\pyqt5_tools\路徑下。
- 設定項目的參考資料:
pyqt-integration.qtdesigner.path Path of executable file of qt designer, the extension will ask you to set at the first time it runs, e.g. c:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\site-packages\\pyqt5-tools\\designer.exe pyqt-integration.pyuic.cmd "pyuic" command, default "pyuic5" pyqt-integration.pyuic.compile.filepath Compile file path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\UI\\Ui_${ui_name}.py pyqt-integration.pyuic.compile.addOptions Additional options for pyuic compiling, it can be a combination of '-x', '-d', '-i', etc. pyqt-integration.pyrcc.cmd "pyrcc" command, default "pyrcc5" pyqt-integration.pyrcc.compile.filepath Compile file path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\QRC\\${qrc_name}_rc.py pyqt-integration.pyrcc.compile.addOptions Additional options for pyrcc compiling, it can be a combination of '-root', '-threshold', '-compress', '-no-compress', etc. pyqt-integration.pylupdate.cmd "pylupdate" command, default "pylupdate5" pyqt-integration.pylupdate.compile.filepath Only works when compiling an UI file (.py), Stores the target '.ts' file's path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\TS\\${ts_name}.ts pyqt-integration.pylupdate.compile.addOptions Additional options for pylupdate, it can be a combination of '-verbose', '-noobsolete', '-tr-function', '-translate-function', etc. pyqt-integration.linguist.cmd "linguist" command, default "linguist"
站內搜尋:Yahoo搜尋的結果,如果沒有給完整的網址,請在站內再搜尋一次!
2019-08-17
讓在Anaconda Navigator環境下安裝執行的Visual Studio Code增加PYQT Integration的擴充功能
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言