Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Changing HTML in QtWebView

    Mobile and Embedded
    qml html android qtwebview
    1
    1
    675
    Loading More Posts
    • 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.
    • M
      mkeezy last edited by mkeezy

      Hi,

      I'm currently trying to build an interactive book using Qt. To achieve that, I want to display rendered HTML with keywords. If the user clicks on a keyword, a menu shows up displaying various ways to interact with said keyword.

      Depending on what you choose the story will change so it is crucial that the displayed text also changes.

      Since I'm using HTML and want the app to be multi platform, my only option to render HTML is QtWebView. This is where the trouble starts.

      I can import QtWebView 1.1 in my QML file, but the WebView never appears in the QML Types section. If I put it in by editing the QML file textually, I get a functional browser but the Designer claims Item could not be created when hovering over it in the navigator. There's also an exclamation mark next to the WebView and next to the root object, when hovering over the one next to the root object, Qt claims that module "QtWebView" is not installed. However, this is not the case. QtWebView exists both in my GCC- and in my ARM7 installation of Qt.

      Even though it's ugly and not really intuitive, I could live with that if the rest was working. However, I can't access the methods for QtWebView in my C++ code. When I try to #include <QtWebView> it claims that there is no such file or directory. Thus I can't even call loadHtml().

      I already thought of putting HTML into seperate files and editing those using fopen() , but android doesn't allow you to change assets after the APK has been created.

      I've been reading the docs over and over again but can't seem to come up with a solution. Any help would be really awesome.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post