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

FileDialog doesn't set fileUrl or fileURLs when run using XDG portals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15.3
    • Quick: Dialogs
    • None
    • Linux/Wayland

      FileDialog sets fileUrl and/or fileUrls when run normally and the user accepts the dialog. However, when executed in a Flatpak app where the file dialog comes from an XDG desktop portal, neither are set, so it is impossible to get the URL or URLs back from the dialog.

      The attached test program illustrates the issue. When you compile and run it normally, show the dialog, type a filename, and accept, fileUrl and fileURLs get set. When you do the same in a Flatpak, they don't.

       

      Local compilation:

      cd filedialogfail && cmake . && make && ./filedialogfail

       

      Flatpak compilation:

      cd filedialogfail && flatpak-builder --force-clean --user --install build-dir org.nate.filedialogfail.yaml && flatpak run org.nate.filedialogfail

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            pointedstick Nate Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes