Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108087

Android SDK31 WebView не отображает локальные файлы «ERR_ACCESS_DENIED»

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • 6.5
    • 6.4.0
    • WebView
    • None
    • Android

      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"));
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            stromme Christian
            dail45 Danila Semerechenskikh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes