Accessing methods of a lib
-
I build a QT project using
TEMPLATE = liband create a.dll
In other project usingTEMPLATE = appI load this.dll, but I don't know how to retrieve returns from methods/functions from this.dll.To be clear I have compiled library is: https://github.com/QupZilla/qtwebkit-plugins
I need retrieve
QStringListfrom this methodQStringList suggest(const QString &word);(inspeller.h) for my application.How to return the variables of DLLs for main application?
-
Hope you have built plugin and plugin is loaded using the QPluginLoader. You need to get a instance to QObject and type cast to required interface. Once you have the interface variable, you can directly call method which return the required string.
-
Hope you have built plugin and plugin is loaded using the QPluginLoader. You need to get a instance to QObject and type cast to required interface. Once you have the interface variable, you can directly call method which return the required string.
@dheerendra said:
You need to get a instance to QObject and type cast to required interface.
From plugin? The QT automatically loads the plugin (
qtdir/plugins/webkit/qwebkitplatformplugin.dll), do not know if it is usedQPluginLoader, I noticed that if I addqdebug() << "test";indllit shows in the main console application, maybe I can useQApplicationto share "data".