Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.1, 5.11.1
-
None
-
* Host: Sierra 10.13.6
* Qt: 5.11.1 for iOS
* XCode: 9.4.1
* Target: iPhone 6, iOS 11.4.1
Description
I want to show the dialog which contains a Pictures. I have read this documentation: http://doc.qt.io/qt-5/qstandardpaths.html
Note: On iOS, if you do pass QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last() as argument to QFileDialog::setDirectory(), 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.
And I have read a workaround from this bug: https://bugreports.qt.io/browse/QTBUG-59097 :
Did you also assign your Info.plist to QMAKE_INFO_PLIST, and after that ran qmake to regenerate the Xcode project? If you did, and it still doesn't work, could you put your pro file on gist? As a work-around, try to add QTPLUGIN += qiosnsphotolibrarysupport explicit to your pro file.
So, I have created a simple QWidgets project where I have added following:
- Info.plist with the "NSPhotoLibraryUsageDescription" key property.
- QTPLUGIN += qiosnsphotolibrarysupport
When I try to run the application, it displayed a black screen on:
- iPhone 6 (iOS 11.4.1)
- Simulator iPhones (iOS 11.14) ..., 5, 5s, ..., 6, 6s, 6s+, ... 7, 8, ...
Please see attached example which reproduces an issue.