Unsolved How to create and use Qt DLL's (with UI) and use them in an application
-
Hi,
I am trying to create a main QWidget application that should load DLL's from an extension folder, where these DLL's are stored.
Each DLL is a Qt Widget created with a .ui form file.I would like to know:
- How to create such DLL's so that they can be imported. For ease, they should be able to be created using the UI designer through Visual Studio. Preferably the project creating the DLL could be a QT application that loads the widget, so that during development, I can have the DLL visualized.
- How to import them into my main project and have then displayed in eg. tabs as child dialogs, one for each tab.
Thanks in advance!
Carsten
-
@panch Take a look at http://doc.qt.io/qt-5/plugins-howto.html
For graphical design you can take a look at QtDesigner source code and/or DLL. -
@panch
see the Echo plugin example
Just adapt your interface (EchoInterface
in the example) so that there is a method which returns a new QWidget* when called. -
@raven-worx Thanks alot! actually I got it working, following this simple example:
https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_applicationBut I will look at the extension way as well, seems more like the right way to go.