0

I have a working Python console script and have created a plugin (processing provider through the plugin builder). Now I want to put the python console script into the plugin. Can I simply copy and paste the script? Which file do I need to edit and where?

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Aug 22, 2022 at 14:20

1 Answer 1

2

Here is a link that will teach you all you will need to know to create your first QGIS plugin.

You can copy/paste what you wrote in the QGIS python console to the python file called "name_of_your_plugin".py in your plugin folder but you will need to link your functions to a pushbutton (use Qtdesigner for this) for instance to make it work.

Vince
20.5k16 gold badges49 silver badges65 bronze badges
answered Aug 22, 2022 at 14:42
4
  • I have already created the QGIS plugin. I need help on how to add my script (previously made in the QGIS python console) to the plugin. Commented Aug 22, 2022 at 14:52
  • Link-only answers are usually deleted by the review process. Please Edit the Answer to contain at least a summary. Commented Aug 22, 2022 at 17:22
  • @Vince, while this is generally true for links pointing to information, I think that in the case of a step-by-step tutorial, the beneficial content is indeed the link and summarizing it in the answer text is unlikely to be helpful unless it would essentially be duplicated. Commented Aug 23, 2022 at 10:00
  • And when that link goes stale, since they all do, eventually, then the link-only Answer is devoid of useful information. You don't need to duplicate the information to provide enough detail that the link contents can be found again. It could be enough to include the name of the page in the documentation to be the link text instead of just "link". Commented Aug 23, 2022 at 11:14

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.