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:
Qt Code:
  1. #
  2. xBeeComms *comms = xBeeComms(); // Object
  3. #
  4. ...
  5. #
  6. connect( comms, SIGNAL( dataReceived( QbyteArray * ) ), this, SLOT( receivedData( QByteArray * ) ) ); // In the constructor
  7.  
  8. delete comms; // <- really if you need it to be destroyed
To copy to clipboard, switch view to plain text mode