Hello, I am trying to send a signal from one class to another class. For this, I am using a connect line such as this:
Qt Code:
  1. USB *USBInstance = new USB;
  2. connect(this,SIGNAL(sendChosenComPort(QString)),USBInstance,SLOT(receiveChosenComPort()));
To copy to clipboard, switch view to plain text mode 
But after I add these lines, when I run, "The program has unexpectedly finished." error appears.
Then I tried to add

Qt Code:
  1. USB* USBInstance ;
To copy to clipboard, switch view to plain text mode 
to the header file and

Qt Code:
  1. USBInstance = new USB()
To copy to clipboard, switch view to plain text mode 
to cpp. file. But again that gives an error. How can I connect 2 different classes in order to send a signal? Thanks beforehand.
P.S: I am a total newbie to QT, so please explain it accordingly .