[SOLVED]How to Pass Signal from one .so file to another?
-
Hi,
How to have communication between two .so files.I want to send signal from one .so file to another .so file. both .so files are used in the same project.
-
Hi,
Technically, you don't send signals to .so files. You do it on QObject derivatives.
Anyway, just use the class from both libraries and connect them. You already do it when using the various libraries from Qt.
-
Dear,
If we use as interface,
@
#include "BackPlaneInterface.h"
IntefaceBackPlane *IBackPlane;QPluginLoader loaderBck("libBackPlaneInterface.so",this); IBackPlane = qobject_cast<IntefaceBackPlane*>(loaderBck.instance()); IBackPlane->InitializeBpObject();
@
i think we can, But when using as belowFirst .so,
@QLibrary *m_objPTLibrary; m_objPTLibrary = new QLibrary("./libQmaxPTLibrary.so"); typedef void (*pf1)(QString,QString); pf1 InitPTLibrary = (pf1)m_objPTLibrary->resolve("InitPTLibrary");@
Second .so,
@QLibrary *MyLib; MyLib = new QLibrary("./libGPIOEvent.so"); typedef void (*pf2)(QWidget*,QString,QString,int*); pf2 InvokeGPIOEvent = (pf2)MyLib->resolve("InvokeGPIOEvent");@
How to connect between This?
-
[quote author="dreamerindia" date="1377164054"]Dear,
i think we can, But when using as below
First .so,
@QLibrary *m_objPTLibrary; m_objPTLibrary = new QLibrary("./libQmaxPTLibrary.so"); typedef void (*pf1)(QString,QString); pf1 InitPTLibrary = (pf1)m_objPTLibrary->resolve("InitPTLibrary");@
Second .so,
@QLibrary *MyLib; MyLib = new QLibrary("./libGPIOEvent.so"); typedef void (*pf2)(QWidget*,QString,QString,int*); pf2 InvokeGPIOEvent = (pf2)MyLib->resolve("InvokeGPIOEvent");@
How to connect between This?
[/quote]You can use signal/slot connection between QObject derived classes.... What you are doing is simply resolving functions from library.... functions != objects
in Qt5 you can connect signal from derived QObject class to normal function, but you can't connect to simple functions with each over...