To log the user in I have a method in the following classclass ProbeConnection : public QObject, QRunnable
.
The method to login is called run as is expected for the QRunnable class.
void ProbeConnection::run(QString username, QString password, QString ipAddress, bool fts, bool tts, bool pcap, bool events, bool os_meas)
The method needs to run in a different thread as it is blocking the gui when there is no response (the method is used for logging in).
I tried to get it to run with QtConcurrent
by running:
QFuture<void> future = QtConcurrent::run(this->run(username, password, ipAddress, fts, tts, pcap, events, os_meas));
But the message i get is:
no matching function for call to 'run'
How can I start the run method when it takes parameters?