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

QQuickWindow::grabWindows() can't get image.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.5.1, 5.6.0
    • QPA
    • None
    • Android

      android device
      I can get a normal image by call QQuickWindow::grabWindows() at most devices,but only at a few device I gotted a black image.
      why? i think android device cause this problem, but the greater reason is Qt.

      a demo in attachment. you can check it.

      void ALGrabber::grabPicture(QQuickWindow *w)
      {
      // emit sigSharePicture(w->grabWindow());
      QImage image = w->grabWindow();
      QString savePath = "/sdcard/temppp.png";
      QDir dir = QFileInfo(savePath).absoluteDir();
      if(!dir.exists())

      { dir.mkdir(QFileInfo(savePath).absolutePath()); }

      image.save(savePath);
      }

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

            esabraha Eskil Abrahamsen Blomfeldt
            lanxiaziyi lanxiaziyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes