Python Forum
[PyQt] how to create qt plugins
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] how to create qt plugins
#1
dear forum members,

I am new to python GUI development. I'd like to make a simple application which I can extend by plugins.

How can I write a plugin in python? I'd prefer to use Qt since I am already familiar with it, just a little. I want to learn about plugin development.

Can you provide some suggestions where to start?

Thank you!
Reply
#2
Are you familiar with python already? You have to learn about modules and class structures, or else the learning curve will be a little steep.

Altough it use no dynamic plugin manager, here is an example of a modular application: https://gitlab.com/william.belanger/obsuite
Notice how the main.py file is short, and all the code is isolated in the plugins.
Reply
#3
Yes, I am familiar with python and basic design pattern concepts. Meanwhile I've found some excellent resources for plugin manager without GUI. I am aiming for a modular GUI application, though it looks like I'll have a look into the fundamentals of plugin manager and GUI applications separately.

Your link is an excellent example, very interesting! :)

(Oct-24-2018, 01:42 PM)Alfalfa Wrote: here is an example of a modular application: https://gitlab.com/william.belanger/obsuite
Reply
#4
Thanks :) I found that as the apps grow bigger, to keep a decent structure the easiest way is to subclass Qt widgets, then to communicate with the main loop by using Qt's signals and slots. That way you can keep the main.py file lean and split your code into modules, so it is much easier to maintain afterward. Refactoring is very tedious so it is a good idea to do it right from the beginning.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020