[Development] QRC based javascript source in QWebEngineView

Scott Bloom scott at towel42.com
Sat Sep 27 02:12:47 CEST 2025


Im having problems loading html that has javascript inside of it.

I am loading the URL into the QWebEngineView  via a url that looks like QUrl( "qrc:/XXX.html" )

The top level html, uses a standard html tag for <script src="xxxx"> where xxx is always relative, there are no QRC based urls inside the html or any imported JS files.

However, it seems that the nested import commands in the JS do not look inside the QRC, and for some reason I get an error saying

js: Fetch API cannot load qrc:/pathtofile/base.json. URL scheme "qrc" is not supported.

I have confirmed that the file DOES exist from the C++ QFile based world, but Im stumped trying to figure out what is going on.

Is there anyway to track this down?

Scott


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250927/3500801e/attachment.htm>


More information about the Development mailing list