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

grabWindow on Mac Retina display captures only partial screen (bottom-left) quadrant

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.2.1
    • Quick: SceneGraph
    • None
    • Qt 5.2.1 and latest stable branch on Mar 8
      Mac OS 10.9.1 on Retina display
    • macOS

      Attached screenshot of youtubeview example
      Sample code:

      void QuickHelper::grabItem(QQuickItem *item, const QString &filename)
      {
          QQuickWindow *w = window();
          QImage img = w->grabWindow();
          while (img.width() * img.height() == 0)
              img = w->grabWindow();
          QQuickItem *rootItem = w->contentItem();
          QRectF rectf = rootItem->mapRectFromItem(item, QRectF(0, 0, item->width(), item->height()));
          QDir docsDir = QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
          pwd.mkdir("output");
          img.save(docsDir.absolutePath()+"/output/" + filename);
          emit imageSaved(item, docsDir.absolutePath()+"/output/" + filename);
      }
      

        1. image1.jpg
          14 kB
          Sunil Reddy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            sunilpro Sunil Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes