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

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Jul 27 14:00:02 PDT 2016


Thanks Martin, I've got that working and added the process as an
answer to the Stack Exchange question.





On Wed, Jul 27, 2016 at 2:21 PM, Martin Dobias <wonder.sk at gmail.com> wrote:
> 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