[Interest] Finally about extends my app function ability
ernestoac at icrt.cu
Mon Jan 16 03:09:18 CET 2017
Hello, thanks again to /Bob Hood/, /Konstantin Tokarev/ and /Thiago
Well, in my previous mail, I show you an example project to test my
doubts about extending app through plugin addition (in this case from
Static Library). After reading all yours considerations several
occasions and reading Qt Documentation about plugins. I included the
plugin correctly in my MainApp.
Here is the code:
//This is header file of *Lib1*
classLib1:publicQObject,publicPInterface *_//here I have to include the
inherit of QObject and its macro_*
*_//here I miss the plugin metadata ID and allow me instantiate this
//This is cpp file of *Lib1*
//This is cpp file of *MainApp*
foreach(QStringfilename,plugins_list) *_//In this structure I abbreviated_*
*_//My problem was the cast type, I was usin reinterpret_cast and now
//This is header file of my interface, is included by both projects
classPInterface *_//this class was inheriting of QObject, and as Lib1
inherits of PInterface and QObject, so PInterface can´t inherits of
QOjects; and of course I deleted the constructor and O_OBJECT macro._*
I can´t found an explanation of the differences of /reinterpret_cast/
and /dynamic_cast/, because I can´t found information about
/reinterpret_cast/ in Qt Documentation (5.5.0 Qt version).
I thanks to /Steven Davidson/ (from /cconclase/ list), who four years
ago taught me the /dynamic_cast/ use.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest