More

Changing QGIS plugin's icon, why doesn't it change in the menu/toolbar?

Changing QGIS plugin's icon, why doesn't it change in the menu/toolbar?


I've been writing a QGIS plugin (using the "Plugin Builder" plugin), and decided I wanted to change the icon (icon.png">


In QGIS 3, one needs to do

pyrcc5 -o resources.py resources.qrc

Your plugin icon was converted to a byte array and saved inresources.py

So if you want to change this icon you have to compile your resources again:

pyrcc4 -o resources.py resources.qrc

In addition to dmh126's answer make sure you haven't accidentally deleted the import and thus prevented the resources python code from compiling. E.g. if your resources file is 'resources.py' -- assuming python files aren't nested -- you would search your project to make sure your code has the line:

import resources

Alternatively, you can deleteresources.pycand reload the plugin to ensure it is indeed getting compiled.


I had a similar problem, using QGIS Brighton 2.6.1 . I followed your intructions/tips and the solutions was:

  • Open OSGeo4W Shell and change to the plugin folder MyPlugin by typing:cd C:Program FilesQGIS BrightonappsqgispythonpluginsMyPlugin

  • Type:make clean(removes the resource_rc.py)

  • Type:make deploy(from resouce.qrc outputs new resource_rc.py)
  • In QGIS plugin manager, disable and re-enable the plugin (outputs new compiled resource_rc.pyc) And the new pictures/logos changed.

Thanks!


Watch the video: Disabling Chromes end of support warning for Windows XPVista