Skip to content
  • 0 Votes
    2 Posts
    2k Views
    T

    Well one way to do it is to use QWebEnginePage::runJavaScript but be careful it executes asynchronously!
    http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html

    then in your javascript - find IMG element by id/class/whatever and set its contents like an embedded image e.g. change src to

    src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=='

    this is example 1x1 pixel black dot image you'll have to substitute with your own image data base64 encoded and of course change image format if you're not using png to data:image/jpg(whatever)

  • 1 Votes
    3 Posts
    2k Views
    H

    I wonder if you ever found an answer to this issue ?

    I have a similar requirement, in that I want to create an online installer that works both ways. It needs to be able to be run in "download-only" mode (no installation, just download the repo). Then my client's IT dept can have a copy of the repo to put on their server, and their users (some of whom don't have internet access) can do a local installation from their local repo.

    It seems that most of the functionality exists:

    The offline installer will create a local repo if asked to (CreateLocalRepository in config.xml). This could then be relocated to their server. The online installer can be forced to act like an offline installer by pointing it the local repo.

    What I can't seem to do is combine 1 and 2 in the same installer. I could create both an offline and an online installer (one for client's IT and one for their users), except that I cannot package all components into the offline installer because some are licensed, and the client should only have access to the components that they have a licence for.

  • 0 Votes
    2 Posts
    2k Views
    A

    Indeed, WebKit has been deprecated and won't, therefore, be shipping with the forthcoming Qt 5.6. However, you can still build from source (or, at least, you should still be able to build it from source).

    As a general rule, new projects ought to use WebEngine, but because there isn't yet a 1:1 correspondance between WebEngine and WebKit (is there ever going to be?!), you might have no choice but have to use WebKit for the time being.

    (I am in that boat too, i.e. WebEngine is currently missing too many things to make it possible for me to drop WebKit -- I tried! --. Yet, I can't see myself building WebKit from source, so I am not going to upgrade to Qt 5.6. In the end, I really wish Qt would release binaries for WebKit. Not as part of Qt 5.6 since it's going to be an LTS, but at least on the side so many people (I am sure) don't feel like their only options are either to build WebKit from source (!!) or stick to Qt 5.5.)

  • 0 Votes
    1 Posts
    815 Views
    No one has replied