Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a Processing Plugin (QGIS3) — QGIS Tutorials and Tips #206

Open
utterances-bot opened this issue Nov 17, 2024 · 4 comments
Open

Comments

@utterances-bot
Copy link

Building a Processing Plugin (QGIS3) — QGIS Tutorials and Tips

https://www.qgistutorials.com/en/docs/3/processing_python_plugin.html

Copy link

Hello Ujaval,

Thanks for the tutorial, really useful and easy to follow! Just one problem I've encountered:

  • I've followed all your instructions to add a menu item and a toolbar button (which I've accomplished) but both the menu item and the toolbar button aren't responsive to clicking. Whenever I click on them I have no response from the program and it's like a useless button.

Also, one question:

  • How can I change the menu to be the Vector one instead of the Plugin?

Thanks in advance.

Copy link

Great tutorial as always. Many thanks

@spatialthoughts
Copy link
Owner

@ArmandCT To add the menu to the Vector menu, use self.iface.addPluginToVectorMenu(). All available methods are in the QgisInterface class.

Regarding the buttons not responding, the button should be connected to a method. In the tutorial, this is done using this line self.action.triggered.connect(self.run).

If you are building plugins, I highly recommend you go through my module on the topic which are on YouTube that covers the topic in much more depth. https://www.youtube.com/watch?v=gzwhSOfknck&list=PLppGmFLhQ1HKKnk3riKNyOxb-3MTI-7zE&index=22

Copy link

HI Ujjaval,
Can you create a plugin using the python code generated by the model builder? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants