Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 2.58 KB

start_plugin.rst

File metadata and controls

85 lines (56 loc) · 2.58 KB

Start QGIS Plugin

Start the Plugin Builder plugin and fill necessary inputs. In the first step, we are going to specify name of Python class, module name, short description, etc.

images/plugin_builder0.png

Initialization of a new QGIS Plugin

Warning

Don't use .py (or any extensions) in the module name.

In the next screen, fill longer description of the plugin.

images/plugin_builder1.png

Filling longer description text

In the next screen, set visual appearance of the plugin. We will use Tool button with dock widget.

images/plugin_builder2.png

Choosing visual representation of a new plugin

There are three options:

In the next step, we shell check all the metafiles, the builder will generate for us. We shall leave all checked.

images/plugin_builder3.png

Helper metafiles to be generated.

In the next step fill important URLs which is important for later publication of a plugin.

images/plugin_builder4.png

Filling required URLs

In the last step, we pick the location of the newly created plugin. You can pick any location in your computer.

Note

Avoid paths containing non-ascii characters.

images/plugin_builder5.png

Set output folder for a plugin.

Final screen shows summary of the new plugin and QGIS environment settings as well as the next required steps.

images/plugin_builder6.png

Summary

Important information are:

  1. Location of the newly created plugin
  2. Default location of all QGIS plugins
  3. Implementation file is called :file:`save_views.py`
  4. GUI modification shall happen in Qt Designer using the :file:`save_views_dialog_base.ui` file
  5. Next step is to use :program:`pb_tool` for the plugin management

There is also information about folders, where QGIS is looking for installed plugins. On Linux, this typically is :file:`$HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins`. On MS Windows it may be :file:`%APPDATA%\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins`.