Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML WebView - page interaction?
Forum Updated to NodeBB v4.3 + New Features

QML WebView - page interaction?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 979 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.
  • V Offline
    V Offline
    VRHans
    wrote on last edited by
    #1

    I have a QML based UI that has a "QtWebView 1.0" WebView component on it.

    What is the best way to interact with a page loaded from a web server (not a local resource)?

    Is there some way to, for example, insert a JavaScript object into the loaded page?
    Can I get signaled somehow on a page 'postMessage' call?

    From looking at the Qt 5.5 documentation it seems to indicate that the QML object WebView is only good viewing HTML content, not actually doing anything with it; however, Qt seems to have 'under the hood' mechanisms for getting things done such as invoking method through a metaobject.

    How can I pass a piece of information from the web page through to C++?

    Thanks

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRHans
      wrote on last edited by
      #2

      Is this what QtWebChannel is for? I'm finding it really difficult to figure out what bits and pieces of which Qt web components works in which fashions on which platforms.

      Basically I need to be able to pass a string from a webpage loaded from a remote server into my Qt C++ application on Windows/OSX/Linux/iOS/Android. I would like to use QML so that my UI can look the same on each platform.

      The string is going to be a SAML assertion returned by the user's interaction inside the web page.

      Currently on iOS I use QtWebView 1.1, and elsewhere I used QtWebKit 3.0

      I'm hoping that the 5.6 release (was that supposed to be two days ago?) will unify this, but at this point I'm just hoping I can do something this simple through QML on each platform.

      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