Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Changing HTML in QtWebView

Changing HTML in QtWebView

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qmlhtmlandroidqtwebview
1 Posts 1 Posters 891 Views
  • 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 Offline
    M Offline
    mkeezy
    wrote on 11 Feb 2016, 16:42 last edited by mkeezy 2 Nov 2016, 16:42
    #1

    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
    0

    1/1

    11 Feb 2016, 16:42

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved