Download a simple file
Mobile and Embedded
2
Posts
2
Posters
836
Views
2
Watching
-
wrote on 4 Sept 2015, 06:02 last edited by
When i use "QDesktopServices OpenUrl" with a pdf file link ("http:\www.....fichier.pdf"), the file is well downloaded et opened with Adobe Reader for example.
If i want to download thIs file without opening it, is there a simple command to manage it, or an example ?
Thanks. -
wrote on 4 Sept 2015, 06:11 last edited by
I think you can use QNetworkAccessManager like this:
QNetworkAccessManager* accessManager = //... QNetworkReply * answer = //.. //... answer = accessManager->get( QNetworkRequest( QUrl( url ) ) ); connect( answer , SIGNAL( finished() ), this, SLOT( downloaded() ) );
2/2