How to run:

Qt Code:
  1. QFuture <void> future = QtConcurrent::run(client);
To copy to clipboard, switch view to plain text mode 

error: no matching function for call to 'run(Client&, int)'
I cant find the good way to declare class Client, client(), param... , arg....


Qt Code:
  1. main.cpp
  2. ...
  3. Client client;
  4. QFuture <void> future = QtConcurrent::run(client);
  5. ....
  6.  
  7. file.h
  8. ....
  9. class Client: public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. Client(QObject* parent = 0);
  14. ~Client();
  15. void start(QString address, quint16 port);
  16.  
  17. public slots:
  18. void startTransfer();
  19.  
  20. private:
  21. QTcpSocket client;
  22. };
  23. ....
To copy to clipboard, switch view to plain text mode