Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Multiple paths for baseUrl
Qt 6.11 is out! See what's new in the release blog

Multiple paths for baseUrl

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 299 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.
  • P Offline
    P Offline
    peterkmoss
    wrote on last edited by
    #1

    Hi,

    I'm creating a markdown-viewer in QT and have run into a problem regarding showing images. I want to load both local AND external images at the same time.

    I seem to only be able to either load local images OR external images.

    If I set the baseUrl parameter to the absolute path of the file I have loaded in the program (when calling setHtml on the QWebEngineView) then I can load the local images, but all images with a https://-something source does not load. If I don't provide the baseUrl, then I can't load any local images - even if the source is explicitly set to the full absolute path with file:// in front, eg. file:///home/me/project/image.png.

    I've been stuck with this for a while now, but can't seem to find anyone else trying to do this.
    Is there a way to specify two "baseUrls" of some sort, so that it will both look for the images locally and externally? or perhaps a way to load local images without specifying the baseUrl?

    I hope my question is clear.

    Thanks in advance.

    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