I'm new in Qt programming. I'm trying to make a qt quick "download from an URL" program.
This is what i did:
- I created an DownPage.qml with a button so when I click the button it will download from a link.
- I created an DownPage C class (downpage.cpp and downpage.h) base on this example:
- In my
void downloadFinished(QNetworkReply *reply);
void doDownload(const QUrl &url);
void DownPage::doDownload(const QUrl &url)
qDebug()<<"haha"; // Just for test
reply = manager.get(QNetworkRequest(url));
And when i click, the error appears "TypeError: Result of expression 'DownPage.doDownload' [undefined] is not a function.".
Another question: How can I set directory for the download file?
Pls help me! thanks