Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Can we load a .dll or a .so file (GUI) dynamically in an Application?
I have a scenario like,
10 to 15 GUI client applications written in Qt with GUI. I need to Pack it in a single Application. But the source code will be bulged and else I need to extract all from the different applications and rewrite the code to Optimize it. A lot of re-definitions and duplication may arise while we include all in a single application. So I think about creating DLL or SO files for these GUI applications and these DLL or SO can be addWidget() into the specific layout ,
i.e load the Library file dynamically (I have gone through QLibrary) But I don't want to include Header files, If include Header files we need to recompile it. I mean Applications Using DLL in run time.
I can do this with Non GUI application.
Using
extern c{}
But with GUI Im confused how to pledge in Main Container (as like QMDIArea). Is it Possible?
an Eye 4 Qt
you cant make a gui application into a dll so that another application can import it.
you dont need headers to import dlls without 'extern "C"'. You do need the .lib file with the .dll (windows).
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I have a scenario like,
10 to 15 GUI client applications written in Qt with GUI. I need to Pack it in a single Application. But the source code will be bulged and else I need to extract all from the different applications and rewrite the code to Optimize it. A lot of re-definitions and duplication may arise while we include all in a single application. So I think about creating DLL or SO files for these GUI applications and these DLL or SO can be addWidget() into the specific layout ,
i.e load the Library file dynamically (I have gone through QLibrary) But I don't want to include Header files, If include Header files we need to recompile it. I mean Applications Using DLL in run time.
I can do this with Non GUI application.
Using
extern c{}
But with GUI Im confused how to pledge in Main Container (as like QMDIArea). Is it Possible?
At-Last I got the solution. Use Q11Embededwidget , to pack all the process in to a single window. But Doubt will it work in Windows.
an Eye 4 Qt
Take a look at QPluginLoader and the "Plug & Paint" examples, from that you may be able to find some information.