Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpenGLWidget.grabFramebuffer() can not work
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget.grabFramebuffer() can not work

Scheduled Pinned Locked Moved General and Desktop
openglqopenglwidget
1 Posts 1 Posters 770 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.
  • Z Offline
    Z Offline
    zhangzhisheng
    wrote on last edited by
    #1

    I try to use grabFramebuffer() to take screen shot of QOpenGLWidget,but it can not work。 the picture i get is all grey。 can anybody help me?
    this my code:
    QImage img = ui->glwidget->grabFramebuffer();
    img.save("screen.png", "PNG");

    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