[QGIS-Developer] Qt resources from standalone app

VOLPES-EXT, Jacky Jacky.VOLPES-EXT at canal-de-provence.com
Wed Nov 27 06:12:02 PST 2019


Hi !

I'm working on Windows, with QGIS 3.4.
I instantiate a QgsAdvancedDigitizingDockWidget in my Python QGIS standalone app, which is then looking for resources in ":/images/themes/default/cadtools/etc.".
According to Qt5 resources documentation, "Qt always stores the data directly in the executable, even on Windows".
So I have no .qrc file I could have compiled with pyrcc5.

As a result, I have these error messages in my python console :

qt.svg: Cannot open file ':/images/themes/default/cadtools/cad.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/themes/default/cadtools/construction.svg', because: No such file or directory
qt.svg: Cannot open file ':/images/themes/default/cadtools/parallel.svg', because: No such file or directory
[...]

Maybe there is a way to initialize/register these resources from the python API ?

Thanks,
BR

Jacky Volpes
HR Team pour la Société du Canal de Provence | 2SI - QGIS
Le Tholonet, CS70064
jacky.volpes-ext at canal-de-provence.com<mailto:jacky.volpes-ext at canal-de-provence.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191127/74a18e77/attachment.html>


More information about the QGIS-Developer mailing list