[Development] [Bug] QOpenGLWidget::grab() not behaving properly

Jose Fernandez Navarro jc.fernandez.navarro.lists at gmail.com
Wed Nov 29 17:02:30 CET 2017


Hello, 

I have a QOpenGLWidget object where I draw
using both OpenGL and QPainter. When I called
grab() on the object prior 5.9.2 I would get a seg. fault. 
Now (5.9.2) I can grab the widget's image but
the QPainter stuff is missing and actually it dissappears
from the widget until I refresh it again by panning or zooming on it. 

This is how I do the grabbing: 

    const QPixmap res = grab(QRect(0,0,width(),height()));
    return res.toImage();

Is this a known bug? or is it actually a bug? I believe
it should be possible to grab the image from the widget
even if I draw on it with both OpenGL and QPainter. 
I figured I would post it here before creating an issue.

ps: I am using OSX (latest version, Sierra). 

Thanks in advance.

Best,

Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20171129/952f5877/attachment.html>


More information about the Development mailing list