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.


Fig. 5 Initialization of a new QGIS Plugin


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

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


Fig. 6 Filling longer description text

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


Fig. 7 Choosing visual representation of a new plugin

There are three options:

  • Tool button with dialog
  • Tool button with dockwidget
  • Processing provider (see QGIS Advanced course)

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


Fig. 8 Helper metafiles to be generated.

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


Fig. 9 Filling required URLs

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


Avoid paths containing non-ascii characters.


Fig. 10 Set output folder for a plugin.


Fig. 11 Summary


On Microsoft Windows at this point, you may see error message about pyrcc5 script not being available in your system and therefore it could not be compiled. Do not panic, we will compile the plugin manually later with environment set up.


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


Fig. 12 Plugin summary

Important information are:

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

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