From 91efad8ef773ce93093e2a795fd389c50e7033f0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 6 May 2015 11:31:04 +0200 Subject: [PATCH] doc: document how QFileDialog can be used to pick photos on iOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iab4a0842f811cd26484123e6949c9b6a0ef0d524 Reviewed-by: Topi Reiniƶ --- src/widgets/dialogs/qfiledialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 8590467abc..a9d5574428 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -893,6 +893,12 @@ void QFileDialogPrivate::_q_goToUrl(const QUrl &url) /*! Sets the file dialog's current \a directory. + + \note On iOS, if you set \a directory to \l{QStandardPaths::standardLocations()} + {QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last()}, + a native image picker dialog will be used for accessing the user's photo album. + The filename returned can be loaded using QFile and related APIs. + This feature was added in Qt 5.5. */ void QFileDialog::setDirectory(const QString &directory) {