2

I am writing a small application containing a WebView component. The final app should work in a kiosk setup, so I need to clear everything in between different sessions, in particular the navigation history. Is this possible in QML at all?

giallu
  • 21
  • 1

1 Answers1

0

This is not an answer yet, but I'm making it into a wiki in the hope that someone can complete it.

You may want to look at QtWebKit.experimental. If you add import QtWebKit.experimental 1.0 to your QML files, your WebView objects gain an experimental attribute that gives you access to all sorts of super powers. Of particular interest to you are probably experimental.navigationHistory.backItems and experimental.navigationHistory.forwardItems, which provide models for the two halves of the navigation stack. I've never used them, but I did find this example that may help.

Unfortunately, the source seems to indicate that these are read-only objects, so you may not be able to clear them from QML.

  • I followed the QtWebKit.experimental path before, but as you noticed the properties are read only, that is, calling reset() on those two ListModels has no effect. – giallu Feb 11 '14 at 09:58