Liachtei
26th March 2015, 10:27
Hello Guys,
I hope you can help me with a problem. I developed a Qt application with various DLLs on Visual Studio. When I try to send signals inside one DLL everything works fine. Now i want to send signals across dlls and now the receiving slot is never called. The connect return true and the signal is emitted correctly. I even debugged into the Qt code and verified that the pointers are always correct and that there is no other object involved.
The connection is here:
bool test = connect(sensor, SIGNAL(sendMessage(QByteArray)), channel, SLOT(receiveMessageForTransit(QByteArray)));
The signal emit is here:
const QByteArray msg = this->convertDataEntityToByteArray(type, rawData)
emit sendMessage(msg);
My export DLL code looks like:
#ifdef SENSORSUBSYSTEM_LIB
# define SENSORSUBSYSTEM_EXPORT Q_DECL_EXPORT
#else
# define SENSORSUBSYSTEM_EXPORT Q_DECL_IMPORT
#endif
The signal is emitted and Qt knows that there is a receiver connected to it. but the corresponding slot is never called. Do I have to do some extra exportor can somebody see an error in my export macro.
I hope you can help me with a problem. I developed a Qt application with various DLLs on Visual Studio. When I try to send signals inside one DLL everything works fine. Now i want to send signals across dlls and now the receiving slot is never called. The connect return true and the signal is emitted correctly. I even debugged into the Qt code and verified that the pointers are always correct and that there is no other object involved.
The connection is here:
bool test = connect(sensor, SIGNAL(sendMessage(QByteArray)), channel, SLOT(receiveMessageForTransit(QByteArray)));
The signal emit is here:
const QByteArray msg = this->convertDataEntityToByteArray(type, rawData)
emit sendMessage(msg);
My export DLL code looks like:
#ifdef SENSORSUBSYSTEM_LIB
# define SENSORSUBSYSTEM_EXPORT Q_DECL_EXPORT
#else
# define SENSORSUBSYSTEM_EXPORT Q_DECL_IMPORT
#endif
The signal is emitted and Qt knows that there is a receiver connected to it. but the corresponding slot is never called. Do I have to do some extra exportor can somebody see an error in my export macro.