Results 1 to 7 of 7

Thread: WebView download file

  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default WebView download file

    I am trying to create a QML-based mobile application for downloading files from the web. As far as I know Qt WebEngine is not supported on Android, therefore I am using WebView instead. I have come to notice that it doesn't provide anything like downloadRequested or downloadFinished. How do I handle download requests?
    Magicians do not exist

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: WebView download file

    The web view is a wrapper around the system web component so maybe these do not expose that functionality on all platforms.

    Since Android does not artificially restrict web engines I would not rule out that QWebEngine does actually work. After all it is Chromium based so the base code needs to be buildable on Android.

    Cheers,
    _

  3. #3
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: WebView download file

    Well, If I add webengine module to the .pro file, it claims that the module can't be found.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: WebView download file

    Hmm, maybe it so not built by default or it is really not supported at the moment.

    I wonder how difficult it would be to extend the WebView integration on Android.

    Cheers,
    _

  5. #5
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: WebView download file

    I read about it here.

    I wonder how difficult it would be to extend the WebView integration on Android.
    And I, in my turn, wonder how come mobile-oriented QML doesn't provide anything for such a common task? As a desktop developer I have been a loyal Qt adherent for years, therefore it was my first bet for the Android application too. But now I have second thoughts about it as Qt's support of mobile platforms leaves much to be desired...

  6. #6
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: WebView download file

    Considering the lack of download functionality in the web view I am thinking of going another way: the system browser will be used for downloading and then this file should be automatically opened with my application. May be inconvenient to switch between two apps, but I don't see a better way as yet.

    I have created a separate question for that here.

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: WebView download file

    Quote Originally Posted by mentalmushroom View Post
    I
    And I, in my turn, wonder how come mobile-oriented QML doesn't provide anything for such a common task?
    It is a wrapper around a native component, these vary a lot between platforms
    I usually don't wonder when the wrapper API is very simple, as this is most often caused by some of the native APIs not exporting some functionality.

    In some case there are platform specific extension APIs.

    I am more surprised that QWebEngine is not available on Android, as that platform usually does not artifically restrict everything to use a single web browser engine.

    Cheers,
    _

Similar Threads

  1. How to load CHM file in Qt webview?
    By Gokulnathvc in forum Newbie
    Replies: 1
    Last Post: 22nd January 2016, 11:43
  2. Download file from X to Y bytes
    By mecrazycoder in forum Newbie
    Replies: 4
    Last Post: 12th May 2011, 06:22
  3. Download File
    By BalaQT in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2010, 10:53
  4. How to download any file through ftp server
    By thomasjoy in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2007, 02:23

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.