[Qgis-developer] Images and button in Qt Designer

Richard Duivenvoorde rdmailings at duif.net
Fri May 6 04:26:50 PDT 2016


On 06-05-16 12:11, matteo wrote:
> Hi Ginetto,
> 
> 
>> please read carefully error mesages
>>
>>> pyrcc4 -o resources.py >>>> resources.qrc <<<<
>>> ImportError: No module named >>>> resources_rc <<<<<
> 
> I did but I don't get it..
> 
> The resource.py and the resource.qrc files are by default present in the
> plugin folder.
> 
> If I add an icon with Qt Designer (I put the icon in a icons folder in
> the plugin tree) and I choose the existing resource.qrc file as resource
> file.. after the compilation command
> 
> pyrcc4 -o resource.py resource.qrc
> 
> the loading fails with the cited error of above..
> 
> have I to edit in some way the resources.py?

I have seen this problem several times with the plugin-builder plugins...

Not sure what exactly the problem is, but I solve it by adding the
following just below the import lines in __init__.py

import os
import site
site.addsitedir(os.path.abspath('%s' % os.path.dirname(__file__)))

the actual problem is the name of modules/classes...

Regards,

Richard




More information about the Qgis-developer mailing list