Can QWebView load images from Qt resource files?

前端 未结 1 1775
北海茫月
北海茫月 2020-12-11 16:25

I\'ve bundled some HTML and PNGs in my Qt app\'s resources file (for the help system). Unfortunately I can\'t find a way for the HTML to display images. I\'ve tried various

相关标签:
1条回答
  • Try your resource format as:

    qrc:/resources/cat.png
    

    instead of

    :/resources/cat.png
    

    we have .css files that use images in such a format within webview and it works fine

    0 讨论(0)
提交回复
热议问题