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

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

    XMLWordPrintable

Details

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

    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

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes