[PyQt] Best way to implement a modular framework?

Hans-Peter Jansen hpj at urpla.net
Wed Aug 18 19:41:39 BST 2010


On Tuesday 17 August 2010, 21:00:29 Bernard Van Der Stichele wrote:
> Hello all,
>
> I'm looking for some advice as to the best way of implementing an MDI -
> like application which is modular.
> i.e. I want to have a MainWindow host with a menu which dynamically loads
> a list of modules available at start-up; where each module is simply a
> different dialog window interface (QDialog). The idea is deploy my
> application so that I may, in the future, expand its functionality by
> adding new dialogs as needed (e.g. e-mailing the users one or more files
> which can be dropped in the app directory)
>
> My first simplistic idea was to have the host application look for
> available ui_xxx.py files in the application directory at start-up to
> populate the list of available dialogs, using a suitable naming
> convention.
>
> However, I ultimately need to deploy an executable host application to
> the users and am not sure how if it still would allow me to load
> ui_xxx.py files dynamically.
>
> I welcome any suggestions ... there must be a much better way of building
> a modular app..

Did you noticed Phils latest project: dip?

While in the early stages of an application framework, it already includes 
much functionality of what you seem to be after..

http://www.riverbankcomputing.com/software/dip/intro

Pete


More information about the PyQt mailing list