Description
I ran into the same problem as the following bug:
https://bugreports.qt.io/browse/QTBUG-97487?jql=text%20~%20"ERR_ACCESS_DENIED"
(WebView(Qml) gives me:
net::ERR_ACCESS_DENIED in
file:///data/data/org.qtproject.example.Maths/files/example.pdf
)
But my QT version is 6.4.0, not 5.x.x.
I tried to do this:
qputenv("QT_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS", QByteArray("1")); qputenv("QT_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS_FROM_URLS", QByteArray("1"));
or this:
qputenv("QT5_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS", QByteArray("1")); qputenv("QT5_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS_FROM_URLS", QByteArray("1"));
or this:
qputenv("QT6_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS", QByteArray("1")); qputenv("QT6_ANDROID_WEBVIEW_ALLOW_FILE_ACCESS_FROM_URLS", QByteArray("1"));
Attachments
Issue Links
- duplicates
-
QTBUG-97487 [Android] WebView cannot open local file (net::ERR_ACCESS_DENIED)
- Closed