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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • 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

    Description

      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);
      }
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes