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

Open with dialog API

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • GUI: Other
    • None

    Description

      Would be really nice to have some kind of QDesktopServices::openUrlWith(const QUrl &url) API that would present the system open with dialog.

      On Linux it could re-use the existing xdgDesktopPortalOpen

      {File,Url}

      setting the ask parameter so the dialog is always presented. Additionaly, there could be a fallback using Qt dialogs on top of g_app_info_get_recommended_for_type + g_app_info_launch_uris or manually implementing the MIME spec.

      I was implementing this in application code for X11 just fine but now I have a trouble implementing that with Wayland as QWaylandWindow::requestXdgActivationToken and QGenericUnixServices::portalWindowIdentifier are private and without them it's not possible to present the dialog and open the handler application correctly (the dialog won't be modal, the application won't get focused if it's already running). If Qt doesn't want making those APIs public, please consider implementing this at least.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes