Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. QRenderCaptureReply returns a screenshot with a background and no model

QRenderCaptureReply returns a screenshot with a background and no model

Scheduled Pinned Locked Moved Unsolved C++ Gurus
2 Posts 2 Posters 310 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qingcheng
    wrote on last edited by
    #1
     auto camSelector = this->defaultFrameGraph()->findChild<Qt3DRender::QCamera*>();
     m_cap = new Qt3DRender::QRenderCapture(camSelector);
     connect(this, &Q3DShowWindow::signalGetImage,[&](){
        QEventLoop loop;
        auto reply = m_cap->requestCapture();
        qDebug()<<"wait for m_returnimage finish";
        connect(reply, &Qt3DRender::QRenderCaptureReply::completed, [&] {
            m_returnImage = reply->image();
            qDebug()<<"ok in loop";
            reply->deleteLater();
            loop.quit();
            });
        loop.exec();
        });
    

    Above is a screenshot of a scene I used QRenderCaptureReply to get, but m_ReturnImage only gets the background of the scene.
    Why is that? Did I miss something?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please do not post the same question in multiple sub-forum. One is enough.

      Duplicate

      Closing this one.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved