4

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?

2 Answers 2

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.

2
  • 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
    Commented Nov 18, 2019 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. Commented Nov 19, 2019 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 and acknowledge you have read our privacy policy.

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