Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130973

[iOS] Native image picker dialog freezes when asking for permission

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • 6026a5aa2 (dev), 51b747689 (6.8)

    Description

      Code

      #include <QtWidgets>
      #include <QStandardPaths>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          qDebug("Started");
      
          QPushButton btn_pics("Open image picker");
          QObject::connect(&btn_pics, &QPushButton::clicked, &app, []{
              qDebug("Opening native QFileDialog...");
      
              QFileDialog d;
              d.setDirectory(QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last());
              d.exec();
      
              qDebug() << "QFileDialog closed. Selected" << d.selectedUrls();
          });
          btn_pics.show();
      
          return app.exec();
      }
      

       

      Steps to reproduce

      1. Use Qt Creator to build and run the attached project for iOS in Debug mode
      2. Tap "Open image picker"
      3. (A permissions dialog should have opened) Select "Allow Full Access"

       

      Expected outcomes
      After selecting "Allow Full Access", the user can proceed to choose an image

       

      Actual outcomes
      After selecting "Allow Full Access", the app freezes

       

      Notes
      After terminating the frozen app and re-running it, tapping "Open image picker" now skips the permissions dialog and the user can proceed to choose an image.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tpochep Timur Pocheptsov
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes