3

Starting with PyQGIS documentation - Developing Python Plugins:

icon - a file name or a relative path (relative to the base folder of the plugin’s compressed package) of a web friendly image (PNG, JPEG)

Sure icon is not the most important thing user cares about when needs to use your plugin to do some GIS processing etc. But it should look reasonably meaningful, and ideally nice, right? Any chance to use SVG? If not, and PNG/JPEG icon must be used as above - what should be the dimensions / color depth, any other recommendations?

1

You can use SVG, PNG and JPEG of any size and color, with or without transparency.

QGIS will display all as 16x16 size if it's in the toolbox.
If it's in the tool bar, it will bring up the size defined in Options: 16, 24, 32, 48 or 64, all squares.

Only on your plugin screen, in the Manage and Install Plugins menu, the icon will appear in its actual size and shape, at the top-right corner.

  • Thank you, do you have any reference or how do you know this? If you add such info I will accept your answer, thanks again. – Miro Nov 18 '19 at 23:03
  • 1
    @Miro It was actually trial and error. I just tested and watched with each file. I have no official reference about this. – Herbert Santos Nov 19 '19 at 10:12
0

It should look different from other buttons in QGIS. I don't want to accidentally open your plugin when I was trying to, for instance, digitize a new feature.

It would be nice if it looked different from other plugins' buttons, but that might be asking too much for you to look at every single available plugin. Maybe just compare to the most popular plugins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.