Philosophy of loading user interface at run time

Hello,

I was asked to make a way that we could add ui elements to an application at run time. For example, the main application would have an empty page in a stack widget. Then the program would look for a ui file (from Designer) and import all of the widgets into that page.

I went through some of the documentation for the QtUiTools object and it sounds promising - at least it uses the word plugin which sounds appropriate. Like always, when looking at Python documentation, you quickly end up with C documentation.

I made a simple application to work on this. Unless I messed something up, this DropBox link should have the three files. The bottom left button is my sandbox code.

The main application uses a ui file from Designer. This is my standard way of creating a program. Additionally, I created a ui file that is supposed to be a Widget. Designer → File → New → Widget. The XML in the ui looks as expected.

However - I have reached the end of my knowledge. Qt must be able to support the idea of a plugin that would bring its own ui file with it? Could anybody provide some guidance or suggestions of what I should be doing with this?

Thanks for your time.