Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Webengine load glyphicons from bootstrap is not allowed

    QtWebEngine
    1
    1
    559
    Loading More Posts
    • 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.
    • W
      webberg last edited by

      Hello,
      I add bootstrap.min.css to qrc, and put glyphicons files in ../fonts where the bootstrap points to. In webengine I code the html header <link href='qrc:/qml/js/bootstrap.min.css' rel='stylesheet'>. But I get the consolse info:

      js: Font from origin 'qrc://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access.
      [0311/101100:INFO:CONSOLE(0)] "Font from origin 'qrc://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access.", source: data:text/html;charset=UTF-8,%3C%21DOCTYPE%20html%3E%0A%3Chtml%20lang%3D%22en%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%3Chead%3E%0A%20%20%20%20%3Cmeta%20charset%3D%22utf-8%22%20%2F%3E%0A%20%20%20%20%3Clink%20href%3D%27qrc%3A%2Fqml%2Fjs%2Fbootstrap.min.css... (0)
      

      I don't know how to solve this issue. I try to put fonts folder in project's parent dir but stiil not work.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post