imageviewer example: support loading images on iOS
Use the last path from QSP to hint that we want to load photos from the global photo library. This should currently only make a difference on iOS. Change-Id: I7a6217dbbbc2e247b69bf406c02001458c757211 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>bb10
parent
11512d6a2c
commit
e5d85ff44e
|
|
@ -107,7 +107,7 @@ void ImageViewer::open()
|
|||
mimeTypeFilters.sort();
|
||||
const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);
|
||||
QFileDialog dialog(this, tr("Open File"),
|
||||
picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first());
|
||||
picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.last());
|
||||
dialog.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dialog.setMimeTypeFilters(mimeTypeFilters);
|
||||
dialog.selectMimeTypeFilter("image/jpeg");
|
||||
|
|
|
|||
Loading…
Reference in New Issue