Best (simplest?) way to have make a dialog (probably as dynamic lib) that can be run standalone AND from an existing QT application
Apologies that this is not a very specific question but more a "what's the 'right' way to do this sort of thing and where can I learn about it?" kind of question.
I have a big chunky QT application that I've inherited; when I execute a big build, I get a number of executables and libraries. The smallest executable starts a dialog that effectively exists on disk as a *.so file (i.e. a dynamic library). There is another way to activate this dialog; the biggest executable that really is the core of the program and does all the heavy work can also, by pressing the right button, present the dialog that is built into the *.so file.
This makes a lot of sense in this context; the GUI "living" in the *.so file does little more ultimately than read and edit xml files - it's essentially a "project configurator", and the user has the option of using the small executable to just edit their project configuration, or the big GUI can be used to both use the project AND configure it.
I thought this was neat (and more importantly I can see a new requirement looming on the horizon to make another one), so I went looking at how it was done; the very first thing I saw in the code that ends up producing the *.so files (where the chain goes little executable ->execute function in *.so -> wrapper object that creates a QApplication object) is a comment warning me that this is hideous and the coder apparently considers the entire way of doing it a bug. So maybe s/he did it in some hideous way that I really shouldn't learn from. Looks like the tiny executable is a thin wrapper that does no more than call an "execute" function in the *.so, and that builds what's referred to internally as a wrapper object.
So what IS the "best" way to do this? By which I probably mean "simplest"; I'm not even sure what QT nomenclature to look up. Is this a QT "plugin"? When I found them, I though it was, but now that I think about it they're described as a way to extend QT functionality, but I don't want to extend functionality; I just want to create a QT dialog that can be displayed and used either from an existing, bigger QT application or from a tiny standalone executable. The way it's being done in my existing example looks very clunky and unnecessarily complicated, so I'd rather not copy it and instead do it the "right" way.
I've been talking about*.so files, but this is a cross-platform effort and builds on Linux, Windows and Solaris, so DLL files for windows.