[Qgis-developer] symbology dialog missing icon resources when called from python script

Martin Dobias wonder.sk at gmail.com
Wed Jul 27 06:21:16 PDT 2016


Hi Barry

On Wed, Jul 27, 2016 at 12:04 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> I'm trying to run the Qgis symbology dialog from a standalone python
> script, and there's some error messages about icons and the icons
> under the symbol layer list are blank.
>
> I can't find any difference between the various search paths in QGIS
> (where it works fine) and my script.
>
> Full details and test script are on gis.stackexchange:
>
> http://gis.stackexchange.com/questions/203663/missing-qgis-icon-resources-for-symbology-dialog

>From what I can tell, the missing icons seem to be contained within
qgis executable, so if that is not loaded, the icons are not
available. I would consider this as a bug as they should be built into
qgis gui library if they are used there. For the time being to work
around your problem, you could create a qrc file, take the missing
icons from qgis source tree, use pyrcc4 to build a python module with
those resources and import it from your script - the icons should load
fine.

Cheers
Martin


More information about the Qgis-developer mailing list