The problem with just a simple object (as you do create it) is that it will be destroyed when you will leave the current block (probably your method here).
So, you ask Qt to connect a signal from a object that is going to be destroyed.
What you could write might be something like:
#
xBeeComms *comms = xBeeComms(); // Object
#
...
#
connect( comms,
SIGNAL( dataReceived
( QbyteArray
* ) ),
this,
SLOT( receivedData
( QByteArray * ) ) );
// In the constructor
delete comms; // <- really if you need it to be destroyed
#
xBeeComms *comms = xBeeComms(); // Object
#
...
#
connect( comms, SIGNAL( dataReceived( QbyteArray * ) ), this, SLOT( receivedData( QByteArray * ) ) ); // In the constructor
delete comms; // <- really if you need it to be destroyed
To copy to clipboard, switch view to plain text mode
Bookmarks