• Polls

    What's keeping you from completely migrating to Open Source GIS on the desktop?

    View Results

    Loading ... Loading ...
  • Categories

  • Desktop GIS Book

  • Archives

PyQGIS Plugin Builder

One of the hurdles in developing a QGIS plugin with Python is just getting the basics down. Getting the plugin setup so it is recognized by QGIS and properly adds it’s menu and toolbar items can be a bit of a chore, especially the first time.

To make the process easier, I put together a web tool to generate a plugin that can be used as a starting point. The tool creates a fully functional plugin that can be loaded in QGIS 1.x. The generated plugin contains an icon and a simple dialog with Ok and Cancel buttons.

Give the PyQGIS Plugin Builder a try and feel free to provide comments and suggestions.

Digg This
Reddit This
Bookmark this on Technorati
Post on Twitter
Printed from: http://spatialgalaxy.net/2009/02/21/pyqgis-plugin-builder/ .
© Gary Sherman 2010.

5 Comments   »

  • Germán says:

    Hi Gary.

    I did try the tool and get a .zip, but I see this:

    * I get three main .py files:
    – miplugin.py
    – mipluginDialog.py
    – Ui_miplugin.py
    But also I get another three files:
    – MiPlugin.py
    – MiPluginDialog.py
    – Ui_MiPlugin.py

    Those files aren’t linked or loaded in the plugin, so I guess I can remove them. Also the contents doesn’t fix with the info that I put in the web form and shows test information like: “begin:2009-02-24″

    * When I try to run the plugin in QGis, by clicking the button I get a Python error:

    line 30, in __init__
    self.ui.setupUi(self)
    TypeError: unbound method setupUi() must be called with Ui_miplugin instance as first argument (got mipluginDialog instance instead)

    Thanks by the tool, it’s useful.

  • Gary says:

    There was a problem with the Plugin Builder. Give it another go.

  • Germán says:

    Still getting unnecessary files.

  • Gary says:

    Those are left over from a previous run of the builder. I’ve fixed it now…

  • Germán says:

    Thanks Gary. It works now.

RSS feed for comments on this post , TrackBack URI

Leave a Reply