socketThread is instantiated from main.cpp, I guess it would be easier if it was instantiated in mainwindow.cpp instead. No more errors on this.

But I have a question on how should I pass the string into my socket slot function? I tried
Qt Code:
  1. string_in = send();
To copy to clipboard, switch view to plain text mode 
but results in an argument not being provided.

Currently this is what I have

socketthread.cpp
Qt Code:
  1. void SocketThread::run()
  2. {
  3. ...connect....
  4. .................
  5. while(1){
  6. string string_in = ""; // I would like to pass the string into string_in
  7. ....
  8. .......
  9. }
  10. exec();
  11. }
To copy to clipboard, switch view to plain text mode