Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Question to example simplebrowser and QWebEngineDownloadItem

Question to example simplebrowser and QWebEngineDownloadItem

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 1 Posters 445 Views
  • 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.
  • T Offline
    T Offline
    TomDoe
    wrote on last edited by
    #1

    Hello,

    I have a little question regarding the download mechanism in QT-WebEngine.
    For this I took a look at the example "simplebrowser".

    There is a class "Browser" in which the "DownloadManagerWidget" receives a call to "downloadRequested". Then a path will be set where the download has to be saved.

    The question I have is, how can I create my own QWebEngineDownloadItem, which will be created when the user hits "Save as"?

    The background for this question is, that I would like to use that example to build a mini-download-manager, which will automatically download a file (no "Save as" user-action) whose url I read from the source-code (this I have already done).

    If my question is not understandable, please let me know and I will try to precise.

    Thanks,
    Tom

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TomDoe
      wrote on last edited by
      #2

      Hello,

      I found out myself.

      You have to call triggerAction(QWebEnginePage::SavePage)

      https://doc.qt.io/qt-5/qwebenginepage.html#triggerAction

      1 Reply Last reply
      0

      • Login

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