Git Product home page Git Product logo

qgis-minimal-plugin's Introduction

QGIS Minimalist Plugin Skeleton

In various QGIS plugin tutorials you are told to use Plugin Builder tool to create a skeleton for your plugin. It is surely helpful as it helps you kickstart your plugin with stuff like UI designer file, auto tests, docs, i18n, scripts and so on.

This QGIS plugin is the complete opposite of a plugin built with Plugin Builder: it is a plugin skeleton cut down to the bare minimum that still results in a valid QGIS plugin. It consists of two files only: a text file with metadata and a Python file with a bit of code.

Why?

For educational purposes, it is useful to understand how a very basic plugin could look like.

For practical reasons, it is sometimes useful to create a single purpose plugin with the least amount of extra bells and whistles, so the code that actually does something is not hidden among generated boilerplate code.

How to use it?

  1. Create a new python plugin directory
  • e.g. Linux ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/minimal
  • e.g. Windows C:\Users\USER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\minimal
  1. Copy metadata.txt and __init__.py to that directory
  2. Start QGIS and enable the plugin (menu Plugins > Manager and Install Plugins...)

Now you should see a "Go!" button in your "Plugins" toolbar (make sure it is enabled in menu Settings > Toolbars > Plugins).

The next step is to change the metadata (e.g. plugin title and description) in metadata.txt and start adding your own code to __init__.py. Have fun!

qgis-minimal-plugin's People

Contributors

wonder-sk avatar raymondnijssen avatar gustry avatar tudorbarascu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.