Hello,
i'm writing an application in C++ with the Qt Framework. It should download a File over http and display the download progress with a QProgressbar - but I don't get that part to work!
Sample code:
QProgressBar* pbar = new QProgressBar();
//calls the website and returns the QNetworkReply*
QNetworkReply* downloader = Downloader->getFile();
connect(downloader, SIGNAL(downloadProgress(qint64,qint64)), pbar, SLOT(setValue(int)));
If I run my code, the following error occurs:
QObject::connect: Incompatible sender/receiver arguments
QNetworkReplyImpl::downloadProgress(qint64,qint64) --> QProgressBar::setValue(int)
But the Qt docs for QNetworkReply say:
This signal is suitable to connecting to QProgressBar::setValue() to update the QProgressBar that provides user feedback.
What is wrong with my code and how do I get it working? I'm running Qt 4.5.3 under Linux.
Thanks for help and sorry for my english!