Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
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
- relates to
-
QTBUG-46496 [iOS]: Add support for QFileOpenEvent
- Open
-
QTBUG-90502 Android Intent handling in Qt 6
- Open
-
QTBUG-106486 Info.plist example shows obsolete CFBundleTypeExtensions key
- Reported
-
QTBUG-106471 qml runtime: Info.plist doesn't agree with QML mime type
- Reported
-
QTBUG-98384 Allow access to raw url string in QFileOpenEvent
- Closed
-
QTBUG-2222 QFileOpenEvent is not supported on Windows
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-106460 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
431754,5 | QtPdf multipage example: add macOS icon; support QFileOpenEvent | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
434406,2 | QtPdf multipage example: add macOS icon; support QFileOpenEvent | 6.4 | qt/qtwebengine | Status: MERGED | +2 | 0 |