Event filter that catches QFileOpenEvent URLs matching a scheme and re-emits them as urlReceived().
More...
Event filter that catches QFileOpenEvent URLs matching a scheme and re-emits them as urlReceived().
On macOS, when the application is registered as a URL scheme handler, the OS delivers incoming URLs via QFileOpenEvent on the QApplication object. Install this filter on QApplication to intercept them:
&mainWindow, &MainWindow::handleUrl);
app.installEventFilter(&filter);
void urlReceived(const QString &url)
UrlSchemeEventFilter(const QStringList &schemes, QObject *parent=nullptr)
Definition url_scheme_event_filter.h:33
Note: the strings are compared against QUrl::scheme(), so they must be written without the "://" suffix (e.g. "cockatrice", not "cockatrice://").