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

QQuickItem::grabToImage does not work on the always-hidden QQuickWindow managed by QQuickRenderControl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.9, 5.15
    • 5.7.0
    • None
    • Linux fx-8320 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64 GNU/Linux
    • 7c9a549 (qtdeclarative/5.15)

    Description

      ...unless private QQuickWindow API is used, like in QQuickWidget::show() and hide().

      qquickitemgrabresult.cpp contains this code:

      {{
      if (!item->window()->isVisible())

      { qWarning("Item::grabToImage: item's window is not visible"); return 0; }

      }}

      that makes it impossible to use grabToImage() on a hidden QWindow. This window, however, may be a hidden window that QQuickWidget uses internally to render results into a framebuffer object. The example "rendercontrol" also uses such a window. This makes it impossible to grab items, that are visible, but contained in an internal, hidden, QWindow, effectively disabling a part of Qt functionality.

      Attachments

        Issue Links

          Activity

            People

              lagocs Laszlo Agocs
              janezzabc Janez Žemva
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: