Ok! First of all my problem:
I have two mount drivers - which is basically bundled up as dll files. Both of the libraries has same interface class. If I call the interface class, it will load the driver classes depending upon which library I load.
It works perfectly fine when I change .pro file LIBS += ... , before compiling the program.
Now I want to load the library dynamically, basically I want to give an option to the user which library (driver) he/she wants to use and load the driver accordingly.
For this, I thought QLibrary is the thing. I am even not sure if QLibrary is the right thing for my purpose. Anyways, I called QLibrary mylib("libraryName") and mylib.load(). Doing this the library is loaded (which is confirmed by mylib.isLoaded()). However, my program gives error.
In the documentation, resolve(QString symbol) method is mentioned. I did not understand what exactly is this "symbol". Is this the name of the class that I want to use from the library? If so how do I use it? I tried giving the name of the class as input variable to this method but it did not work. I am sorry, if I am being completely stupid here.
Thanks and looking forward to your suggestions.
Bookmarks