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)));
bool test = connect(sensor, SIGNAL(sendMessage(QByteArray)), channel, SLOT(receiveMessageForTransit(QByteArray)));
To copy to clipboard, switch view to plain text mode
The signal emit is here:
const QByteArray msg
= this
->convertDataEntityToByteArray
(type, rawData
) emit sendMessage(msg);
const QByteArray msg = this->convertDataEntityToByteArray(type, rawData)
emit sendMessage(msg);
To copy to clipboard, switch view to plain text mode
My export DLL code looks like:
#ifdef SENSORSUBSYSTEM_LIB
# define SENSORSUBSYSTEM_EXPORT Q_DECL_EXPORT
#else
# define SENSORSUBSYSTEM_EXPORT Q_DECL_IMPORT
#endif
#ifdef SENSORSUBSYSTEM_LIB
# define SENSORSUBSYSTEM_EXPORT Q_DECL_EXPORT
#else
# define SENSORSUBSYSTEM_EXPORT Q_DECL_IMPORT
#endif
To copy to clipboard, switch view to plain text mode
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.
Bookmarks