How to run:
QFuture <void> future = QtConcurrent::run(client);
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....
main.cpp
...
Client client;
QFuture <void> future = QtConcurrent::run(client);
....
file.h
....
{
Q_OBJECT
public:
~Client();
void start
(QString address, quint16 port
);
public slots:
void startTransfer();
private:
};
....
main.cpp
...
Client client;
QFuture <void> future = QtConcurrent::run(client);
....
file.h
....
class Client: public QObject
{
Q_OBJECT
public:
Client(QObject* parent = 0);
~Client();
void start(QString address, quint16 port);
public slots:
void startTransfer();
private:
QTcpSocket client;
};
....
To copy to clipboard, switch view to plain text mode
Bookmarks