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

FileDialog on Android returns "content:" url scheme which is unusable with QFile/QImage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.6.1
    • Quick: Widget
    • None
    • Ubuntu 22.04, Android 9, Qt 6.6.1, NDK 25.1.89..., Android API 34
    • Android
    • 2024wk08FOQtforAndroid, 2024wk10FOQtforAndroid, 2024wk12FOQtforAndroid, 2024wk14FOQtforAndroid, 2024wk16FOQtforAndroid

    Description

      import QtCore
      import QtQuick
      import QtQuick.Dialogs
      
      FileDialog {
          id: root
          nameFilters: ["Image files (*.jpg *.jpeg *.png *.bmp *.gif *.pbm *.pgm *.ppm *.xbm *.xpm)"]
          currentFolder: StandardPaths.standardLocations(
                             StandardPaths.PicturesLocation)[0]
          fileMode: FileDialog.OpenFile
      }
      

      After picking a file returns URl of scheme "content:" "content://com.android.providers.media.documents/document/image%3A620513"
      which is unusable with QFile/QImage.
      It must be usable.

      Attachments

        Issue Links

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

          Activity

            People

              lapohjan Lauri Pohjanheimo
              kofr Konstantinr
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes