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

use and document QFileOpenEvent in more places

    XMLWordPrintable

Details

    • All

    Description

      It's documented on its own: https://doc.qt.io/qt-6/qfileopenevent.html and I remember finding out about it once a long time ago (probably when working on QTBUG-34926). But we hardly use it. No widget examples handle this event, but any example or tool that can open files ought to: the widget and Qt Quick text editor examples, the PDF viewer examples, and more. macOS-specific pages like https://doc.qt.io/qt-6/macos.html and https://doc.qt.io/qt-6/macos-issues.html are not reminding users that they need to implement this event handling. I've recently noticed that some things I've written do not handle drag-and-drop or "open with", and had to think for a while: what was that special thing again...

      It's unfortunate that this is still a platform-specific feature. We could alternatively come up with some way to avoid users needing to do this macOS-specific thing in every application.

      We need a strategy for how Qt Quick desktop applications should easily support this feature, too, without having to remember to do something special in C++. So far it's still handled only in tools/qml/main.cpp ... nearly a decade after we added it there.

      Attachments

        Issue Links

          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
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes