Last active
April 20, 2022 20:58
-
-
Save nick4rivers/f08bc7c8049061841e7fc164a49a6c9f to your computer and use it in GitHub Desktop.
Revisions
-
nick4rivers revised this gist
Apr 20, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,7 +70,8 @@ Can be entered in the interpreter if it is being fickle. Note, that new version ## Compiling images Use pyrcc to compile resources like images. This should be installed with Qt5. `pyrcc5 -o resources.py resources.qrc` --- -
nick4rivers revised this gist
Apr 20, 2022 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,10 +63,16 @@ My notes for Mac OS Qt and QGIS python plugin development tools on VSCode --- ## Manual path to the QGIS python install Can be entered in the interpreter if it is being fickle. Note, that new version of QGIS use python 3.9 /Applications/QGIS.app/Contents/MacOS/bin/python3.8 --- ## Compiling images Use pyrcc to compile resources like images. This should be installed with Qt5. pyrcc5 -o resources.py resources.qrc --- -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,15 +60,13 @@ My notes for Mac OS Qt and QGIS python plugin development tools on VSCode "python.pythonPath": "${env:QGIS_PATH}/Contents/MacOS/bin/python3.8" } ``` --- ## Manual path to the QGIS python install Can be entered in the interpreter if it is being fickle /Applications/QGIS.app/Contents/MacOS/bin/python3.8 --- -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,9 +43,9 @@ My notes for Mac OS Qt and QGIS python plugin development tools on VSCode /Applications/QGIS.app/Contents/MacOS/bin/designer --- ## VSCODE PATH SETTINGS *These should be in the .vscode directory, in settings.json* ```js { // FROM: https://gist.github.com/NicolaiMogensen/acfd8723720c4761aefef3cdfc2aa55a // I like changing colors for my projects. QGIS projects are usually green. -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,6 +34,7 @@ My notes for Mac OS Qt and QGIS python plugin development tools on VSCode ## LAUNCH QT DESIGNER THAT SHIPS WITH QGIS: *Launch from the terminal* **FOR LTR** /Applications/QGIS-LTR.app/Contents/MacOS/bin/designer @@ -42,12 +43,9 @@ My notes for Mac OS Qt and QGIS python plugin development tools on VSCode /Applications/QGIS.app/Contents/MacOS/bin/designer --- ##VSCODE PATH SETTINGS *These should be in the .vscode directory, in settings.json* ```json { // FROM: https://gist.github.com/NicolaiMogensen/acfd8723720c4761aefef3cdfc2aa55a // I like changing colors for my projects. QGIS projects are usually green. @@ -61,6 +59,7 @@ VSCODE PATH SETTINGS }, "python.pythonPath": "${env:QGIS_PATH}/Contents/MacOS/bin/python3.8" } ``` ############################################################################## -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 13 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ # PYTHON AND QT NOTES FOR QGIS PLUGIN DEVELOPMENT My notes for Mac OS Qt and QGIS python plugin development tools on VSCode ## Qt DEVELOPMENT VIRTUAL ENV: **NEW** @@ -12,7 +11,6 @@ source my_venv/bin/activate --- ## PIP INSTALL PACKAGES FOR Qt DEVELOPMENT: *PyQt framework @@ -28,25 +26,21 @@ pip install PyQtWebEngine --- ## PB_TOOL *Need to add the path to the plugin folder to pb_tool.cfg* plugin_path: /Users/nick/Library/Application Support/QGIS/QGIS3/profiles/test/python/plugins --- ## LAUNCH QT DESIGNER THAT SHIPS WITH QGIS: *Launch from the terminal* **FOR LTR** /Applications/QGIS-LTR.app/Contents/MacOS/bin/designer **FOR NEWEST RELEASE** /Applications/QGIS.app/Contents/MacOS/bin/designer --- -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 12 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## Qt DEVELOPMENT VIRTUAL ENV: **NEW** python3 -m venv [my_directory] @@ -13,17 +13,20 @@ --- ## PIP INSTALL PACKAGES FOR Qt DEVELOPMENT: *PyQt framework pip install PyQt5 *For packaging QGIS plugins* pip install pb_tool *maybe this one* pip install PyQtWebEngine --- PB_TOOL -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,9 +10,7 @@ **ACTIVATE** source my_venv/bin/activate --- PIP INSTALL PACKAGES FOR Qt DEVELOPMENT: -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 4 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,14 +4,12 @@ ## VIRTUAL ENV: **NEW** python3 -m venv [my_directory] **ACTIVATE** source my_venv/bin/activate ############################################################################## -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,11 @@ ## VIRTUAL ENV: **NEW** python3 -m venv [my_directory] 4 space indention makes full-width standard code blocks - ACTIVATE source my_venv/bin/activate -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ ## VIRTUAL ENV: **NEW** ```python3 -m venv [my_directory]``` - ACTIVATE source my_venv/bin/activate -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ## VIRTUAL ENV: *NEW `python3 -m venv [my_directory]` - ACTIVATE -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ## VIRTUAL ENV: *NEW* `python3 -m venv [my_directory]` - ACTIVATE source my_venv/bin/activate -
nick4rivers revised this gist
Jul 16, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ ## VIRTUAL ENV: *NEW* python3 -m venv [my_directory] - ACTIVATE source my_venv/bin/activate -
nick4rivers created this gist
Jul 16, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,78 @@ # PYTHON AND QT NOTES FOR QGIS PLUGIN DEVELOPMENT ## VIRTUAL ENV: - NEW `python3 -m venv [my_directory]` - ACTIVATE source my_venv/bin/activate ############################################################################## PIP INSTALL PACKAGES FOR Qt DEVELOPMENT: ------------------------------------------------------------------------------ pip install PyQt5 - maybe this one pip install PyQtWebEngine - for Q Plugin development pip install pb_tool ############################################################################## PB_TOOL ------------------------------------------------------------------------------ - need to add the path to the plugin folder to pb_tool.cfg plugin_path: /Users/nick/Library/Application Support/QGIS/QGIS3/profiles/test/python/plugins ############################################################################## LAUNCH QT DESIGNER THAT SHIPS WITH QGIS: -------------------------------------------------- - FOR LTR /Applications/QGIS-LTR.app/Contents/MacOS/bin/designer - FOR NEWEST RELEASE /Applications/QGIS.app/Contents/MacOS/bin/designer ############################################################################## VSCODE PATH SETTINGS ------------------------------------------------------------------------------ - these should be in the .vscode directory, in settings.json { // FROM: https://gist.github.com/NicolaiMogensen/acfd8723720c4761aefef3cdfc2aa55a // I like changing colors for my projects. QGIS projects are usually green. "workbench.colorCustomizations": { "titleBar.activeForeground": "#000000", "titleBar.activeBackground": "#0ff381", }, "terminal.integrated.env.osx": { "PYTHONPATH": "${env:QGIS_PATH}/Contents/Resources/python:${env:QGIS_PATH}/Contents/Resources/python/site-packages:${env:QGIS_PATH}/Contents/Resources/python/site-packages/PyQt5", "PATH": "${env:PATH}:${env:QGIS_PATH}/Contents/MacOS/bin" }, "python.pythonPath": "${env:QGIS_PATH}/Contents/MacOS/bin/python3.8" } ############################################################################## MANUAL PATH TO QGIS PYTHON INTERPRETER ------------------------------------------------------------------------------ /Applications/QGIS.app/Contents/MacOS/bin/python3.8 ##############################################################################