Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Application cache with QtWebkit
Forum Updated to NodeBB v4.3 + New Features

Application cache with QtWebkit

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 2.0k Views 1 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.
  • J Offline
    J Offline
    jonatanp
    wrote on last edited by
    #1

    It's possible the use AppCache with QtWebkit,
    "Example of AppCache in HTML5":http://www.html5rocks.com/en/tutorials/appcache/beginner/

    I use qt 4.8 and I try the webview on qml and widget.

    these are the option that I use for create the webview
    @
    webView->page()->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
    webView->page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
    webView->settings()->enablePersistentStorage("my path");
    @

    and on my html page I have this script to check if the manifest file was changed
    @
    function init() {
    setInterval("updatePage();",3000);
    }
    function updatePage(){
    var status = window.applicationCache.status;
    document.getElementById('txt')[removed] = "status: "+status;
    window.applicationCache.update();
    }
    @

    On the web browser (e.g. chrome) the div txt is egual to 1 or 4 if I change the manifest file.
    On the qt application is always 0, that's means the application is not prepared to receive cache.

    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