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

QPixmap is unable to construct QPixmap(url) in Android 7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.9.2
    • None
    • Android 7.1.1 MIUI 8.5
      build in windows 10 x64
      Qt 5.9.2

    Description

      On android I am trying to construct QPixmap from local storage (internal). It works fine on android below 7. But when doing same in Android 7.1.1 MIUI 8 the QPixmap(url.toLocalPath()) creates Null pixmap.
      The url is right.

      Q_INVOKABLE void setProfileImage(const QString &fileUrl) {
              QUrl url = fileUrl;
              setImgUrl(url.toLocalFile()); // debug del
              setProfileImage(QPixmap(url.toLocalFile()));
          }
      void setProfileImage(const QPixmap &t_profileImage) {
              chargeImageProvider(t_profileImage);
              m_worker->setProfileImage(t_profileImage); // TODO make it work in separate thread.
          }
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              kofr Konstantinr
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes