Include relevant example code in documentation of setUrlHandler

By only looking at the function prototype, it's tempting to assume that
the handler needs to be registered with the usual SLOT macro. That is
not the case.

The code snippet is already included in the class description, but it
doesn't hurt to repeat it here.

Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c
Fixes: QTBUG-50484
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
bb10
Volker Hilsheimer 2018-11-08 19:06:13 +01:00
parent a2b8f891fa
commit c66ddd7aba
1 changed files with 2 additions and 0 deletions

View File

@ -244,6 +244,8 @@ bool QDesktopServices::openUrl(const QUrl &url)
The provided method must be implemented as a slot that only accepts a single QUrl
argument.
\snippet code/src_gui_util_qdesktopservices.cpp 0
To use this function for receiving data from other apps on iOS you also need to
add the custom scheme to the \c CFBundleURLSchemes list in your Info.plist file: