Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.9.2
-
None
-
Windows 10,
Qt 5.9.2
Description
I'm trying to migrate my application to use binary resources bundled with the executable instead of individual files. However, I've discovered a problem related to stylesheets.
I've created a simple file to load into the quicknanobrowser example containing the following
<head>
<style type="text/css">
@font-face {
font-family: Raleway-Bold;
src: url(qrc:///fonts/Raleway-Bold.ttf);
}
body {
background-color: lightblue;
font-family: "Raleway-Bold";
}
</style>
</head>
<body>
<img src="qrc:///icons/go-next.png"/>
</body>
The image resource loads fine, but the stylesheet refuses to load the font and reports the error
"Access to Font at 'qrc:///fonts/Raleway-Bold.ttf' from origin 'file://' has been blocked by CORS policy: Invalid response. Origin 'file://' is therefore not allowed access.", source: file:///C:/Qt/Examples/Qt-5.9.3/webengine/quicknanobrowser/index.html (0)