Hi guys, Thank you for all your replies.
'qgis.utils.plugins' really resolves my problem. This issue obsessed me for a few days, and your advice is fantastic. I can't understand why there is no documentation for such a useful functionality. Anyway, thank you for your help. Appreciate it. Cheers, Zac On Thu, 22 Apr 2021 at 22:01, Raymond Nijssen <[email protected]> wrote: > Hi Zac, > > You can use: > > qgis.utils.plugins > > to get a dictionary with all active plugins. > > > > To find out if another plugin is available: > > 'processing' in qgis.utils.plugins > > > > And use it like: > > processing_pl = qgis.utils.plugins['processing'] > processing_pl.toolbox.searchBox.setText('overlay') > > > Hope this helps, > > Raymond > > > On 22-04-2021 13:07, Zac Wang 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 > > [email protected] > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer > > > _______________________________________________ > QGIS-Developer mailing list > [email protected] > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer >
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
