Multiple paths for baseUrl
-
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 callingsetHtml
on theQWebEngineView
) then I can load the local images, but all images with ahttps://
-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 withfile://
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.