2

I have created two different plugins in QGIS using Python. I would like to combine both in one plugin.

How can I do that?

Taras
  • 32,823
  • 4
  • 66
  • 137
Pugazh
  • 607
  • 6
  • 17
  • 1
    What's exactly your problem? You can combine them creating, for instance, a toolbar, where each button corresponds to each plugin. Your logic would be handled by the slot connected to the "triggered()" signal of each button (action). – Germán Carrillo Feb 10 '15 at 12:24

1 Answers1

1

Every plugin is a python module and every plugin is present in the PYTHONPATH, so you can import it as a python module.

e.g. if your plugin "myplugin" is in ~/.qis2/python/plugins/myplugin you can import with from myplugin import <your class> or import myplugin and use it as usual.

obviously would be a good sw design, strictly separate plugin logic from it's GUI, in this way you can use it's logic as python command.

regards

Luigi Pirelli
  • 2,013
  • 14
  • 19