Unsolved Shared Library Dialog
-
@kshegunov, I read the link. Are you sure "plugins" is what I want?
I simply want to start seeing if Qt has the ability to be modular by loading a dialog inside an application where the dialog is replaceable without recompiling the application. Much like a resource .dll is in Windows.
Do you know if there is an example of using "plugins" to load a dialog?
-
hi
please try/read this small sample
http://doc.qt.io/qt-5/qtwidgets-tools-echoplugin-example.htmlPlugins can BOTH be to extend the qt. but same method/functionality can also be used to extend any Qt app.
So its like with DLLS just more modern using interfaces.
So it can easy be a modul for sharing Dialogs or what ever needed. -
The example doesn't seem to show a dialog (or any other resource) inside a module. It appears to simply echo text back from a module without any resources to an application.
Ideally I would like an example already done that demonstrates my goal. If there is none, the next choice would be a tutorial on how to do it.
Failing all of that, documentation that will give me confidence this will work. I can work from there to create my own example.
I would very much appreciate a full example.
-
Ok. I know no samples that pops a dialog.
The other examples are about expanding the host application.
http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-example.htmlSo im afraid u must keep looking.
-
@TigerBunny
Hi
I was bored. so I modified echo sample to open dialog
https://www.dropbox.com/s/qzunmovatpbmmai/withdialog.zip?dl=0
dialog lives in plugin.
note the UI file is the resource. -
@mrjj, I don't see a UI file. All I get is an error message. Also, there is only 1 project.
I would expect an example to have 2 projects. One that creates the plugin with the dialog, the other an application that uses it. Are my expectations not correct?
-
ok let me check zip. there should be 2 folders. did u unzip correctly?
-
@TigerBunny
hi
for me all is in zip ?
http://postimg.org/image/hbjkgv7vt/including the UI file. in the plugin folder
Make sure you unzip it all. do not click inside the zip file.
extract all first. -
@mrjj ,
I must have used the wrong extraction procedure. I'm not up on Windows compression, my mistake.
I'll take a look. This looks much better. Thanks.
-
@TigerBunny
well windows native zip handling, does "help" one by sort of showing like a folder. :)
Note. to add dialog to sample was very little.
Just add Dialog via FIle->New and then add include to plugin and change
interface function to show ( exec) dialog. -
This works, but I can't find the output file. I assume there is something like a .dll this produces. How do I find it and what would it be called?
-
yes its a DLL
for me its in
E:\build-echoplugin-Desktop_Qt_5_5_0_MinGW_32bit-Debug\pluginsThe PRO file alters the destination.
Its so the main program can find it.look for echoplugind.dll
it might also copy to
$$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugin -
@TigerBunny
It seems @mrjj beat me to it. This thread, however, could also be useful for you.