I'm unable to setup the display of the toolbar icon for a plugin in QGIS 2.0. I have compiled the "resources.qrc" with the correct path and filename, and checked possible spelling errors in the code.
In fact, the icon is displayed in the plugin manager but not on the toolbar or the dropdown menu (?). The plugin has been started using the plugin builder for 1.8 version, but works just fine. The plugin folder is linked to the qgis plugins folder by a symlink on a linux system.
Thanks.
Edit: my qrc file :
<RCC>
<qresource prefix="/plugins/ViewshedAnalysis" >
<file>icon.png</file>
</qresource>
</RCC>
and my code :
self.action = QAction(
QIcon(":/plugins/ViewshedAnalysis/icon.png"),
u"Viewshed", self.iface.mainWindow())
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
# Add toolbar button and menu item
self.iface.addToolBarIcon(self.action)
self.iface.addPluginToMenu(u"&Viewshed Analysis", self.action)
import resources_rc