Hello,
I'm trying to pass an argument to a slot triggered by a finished() signal.
My code right now is this:
download.cpp
(...)
connect(&fdmanager, SIGNAL(finished(QNetworkReply*)),SLOT(FileDownloadFinished(filechk,QNetworkReply*)));
QNetworkRequest request
(QUrl(fileurl.
data()));
fdmanager.get(request);
(...)
void download
::FileDownloadFinished(QByteArray chksum, QNetworkReply
*reply
) { (...)
}
(...)
connect(&fdmanager, SIGNAL(finished(QNetworkReply*)),SLOT(FileDownloadFinished(filechk,QNetworkReply*)));
QNetworkRequest request(QUrl(fileurl.data()));
fdmanager.get(request);
(...)
void download::FileDownloadFinished(QByteArray chksum, QNetworkReply *reply) {
(...)
}
To copy to clipboard, switch view to plain text mode
download.h
(...)
public slots:
void FileDownloadFinished
(QByteArray chksum, QNetworkReply
*reply
);
};
(...)
(...)
public slots:
void FileDownloadFinished(QByteArray chksum, QNetworkReply *reply);
};
(...)
To copy to clipboard, switch view to plain text mode
The code compiles without any warnings, but when it run... I get this on the program output:
Object::connect: No such slot download::FileDownloadFinished(filechk,QNetworkReply*)
Object::connect: No such slot download::FileDownloadFinished(filechk,QNetworkReply*)
To copy to clipboard, switch view to plain text mode
Apparently I'm not passing the arguments correctly... How should I do it?
Thanks in advance.
Bookmarks