Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How do I download a file using QWebView?

How do I download a file using QWebView?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 677 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.
  • D Offline
    D Offline
    Dr. No
    wrote on last edited by
    #1

    There are a bunch of attachment files in the page which I'd like to allow the user download. The default behavior if you click upon link which is an attachment file, is don't open anything at all (I expected the downlaod prompt window actually...) so I found I could call setForwardUnsupportedContent(true) so I'll get notyfied when a new download is requested by downloadRequested/unsupportedContent.

    My question is, how do I implement such method to download the requested file to local PC, considering it's a page where it must be consider the context of having cookies and such (the user is logged in to see those attachments) so I can't do a plain http request, but pass cookies and everything in the request? I have no code to show yet becaue I still have no idea how do so.
    Any help, direction towards something that can help is very appreciated. Thanks in advance.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Did you see this page ?
      https://stackoverflow.com/questions/16346219/how-to-download-files-from-qwebview

      1 Reply Last reply
      1

      • Login

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