2

I am trying to access heatmap plugin from Raster -> HeatMap -> HeatMap using PyQGIS.If my custom button is clicked, the heatmap plugin dialog box should opens.I know the heatmap is a c++ plugin.Is it possible to trigger the heatmap plugin using Python?

1
rasterMenu = qgis.utils.iface.rasterMenu()
for rasterMenuItem in rasterMenu.actions():
 if 'Heatmap' in rasterMenuItem.text():
  heatmapMenu = rasterMenuItem

  for heatmapMenuItem in heatmapMenu.menu().actions():
    print heatmapMenuItem
    if 'Heatmap' in heatmapMenuItem.text():
        heatmapMenuItem.trigger()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.