[QGIS-Developer] How to transfer data between QGIS Python plugins?

Ismail Sunni imajimatika at gmail.com
Thu Apr 22 04:28:16 PDT 2021


Hi Zac,

In PyQGIS you can access the plugin using something like this:

the_plugin_a = qgis.utils.plugins['the_plugin_a']

After that, you can access all stuff in the plugin a.

Perhaps that can solve the problem.

Best Regards

On Thu, Apr 22, 2021 at 1:07 PM Zac Wang <zacwang15 at gmail.com> wrote:

> Hi all,
>
> Are there some ways to transfer data between different pyqgis plugins? I
> hope plugins share state.
>
> The only way I found is to make pluginA to be a child component of
> QgisApp(iface.mainWindow()).
>
> Then in another pluginB, call findChild() to get the object(pluginA) and
> connect its signal.
>
> This is a possible solution, but it's not easy to maintain because plugins
> are not initiated in the same file.
>
> Is there a better solution?
>
> Regards,
>
> Zac
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
Ismail Sunni
Software Engineer
ismailsunni.id
ismailsunni.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210422/4d5bd310/attachment.html>


More information about the QGIS-Developer mailing list