Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Download a simple file
Forum Updated to NodeBB v4.3 + New Features

Download a simple file

Scheduled Pinned Locked Moved Mobile and Embedded
downloadmanager
2 Posts 2 Posters 836 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NGV1
    wrote on 4 Sept 2015, 06:02 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JohanSolo
      wrote on 4 Sept 2015, 06:11 last edited by
      #2

      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() ) ); 
      

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0

      2/2

      4 Sept 2015, 06:11

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved