<div dir="ltr">Hi guys,<div><br></div><div>Thank you for all your replies. </div><div><br></div><div><span style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap">'qgis</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap">.</span><span style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap">utils</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap">.</span><span style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap">plugins' </span>really resolves my problem.<br></div><div><br></div><div>This issue obsessed me for a few days, and your advice is fantastic.</div><div><br></div><div>I can't understand why there is no documentation for such a useful functionality.</div><div><br></div><div>Anyway, thank you for your help. Appreciate it.</div><div><br></div><div><br></div><div>Cheers,</div><div><br></div><div>Zac</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Apr 2021 at 22:01, Raymond Nijssen <<a href="mailto:r.nijssen@terglobo.nl">r.nijssen@terglobo.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Zac,<br>
<br>
You can use:<br>
<br>
qgis.utils.plugins<br>
<br>
to get a dictionary with all active plugins.<br>
<br>
<br>
<br>
To find out if another plugin is available:<br>
<br>
'processing' in qgis.utils.plugins<br>
<br>
<br>
<br>
And use it like:<br>
<br>
processing_pl = qgis.utils.plugins['processing']<br>
processing_pl.toolbox.searchBox.setText('overlay')<br>
<br>
<br>
Hope this helps,<br>
<br>
Raymond<br>
<br>
<br>
On 22-04-2021 13:07, Zac Wang wrote:<br>
> Hi all,<br>
> <br>
> Are there some ways to transfer data between different pyqgis plugins? I <br>
> hope plugins share state.<br>
> <br>
> The only way I found is to make pluginA to be a child component of <br>
> QgisApp(iface.mainWindow()).<br>
> <br>
> Then in another pluginB, call findChild() to get the object(pluginA) and <br>
> connect its signal.<br>
> <br>
> This is a possible solution, but it's not easy to maintain because <br>
> plugins are not initiated in the same file.<br>
> <br>
> Is there a better solution?<br>
> <br>
> Regards,<br>
> <br>
> Zac<br>
> <br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> <br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>