Hi,<div><br></div><div>QPixmap::grabWidget() can fail with QGLWidgets or QVTKWidgets, especially if there is another window in front of the widgets (on Ubuntu with &quot;No Effects&quot;) .</div><div><div><br></div><div>However QGLWidget::grabFrameBuffer() / QVTKWidgets::cachedImage work fine.</div>

<div><br></div><div>In <a href="http://www.commontk.org/index.php/Main_Page">CTK</a>, we handle that problem:</div><div> - ctk::grabWidget for QGLWidgets: <a href="https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkWidgetsUtils.cpp">https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkWidgetsUtils.cpp</a></div>

<div> - ctk::grabVTKWidget for QVTKWidgets: <a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKWidgetsUtils.cpp">https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKWidgetsUtils.cpp</a></div>

<div><br></div><div>Hth,</div><div>Julien.</div><div><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 10:40 AM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
To take a snapshot of the app, QPixmap::grabWidget() is supposed to work.<br>
Have you tried that?<br>
QVTKWidget will take the onscreen pixels and put it in that QPixmap, while the<br>
other QWidgets will paint themselves into the QPixmap.<br>
If you want to use offscreen, I suppose you could set the offscreen flag, then<br>
still call QPixmap::grabWidget().<br>
<br>
Clint<br>
<div><div></div><div class="h5"><br>
On Monday, September 19, 2011 05:56:17 am Malsoaz James wrote:<br>
&gt; I would like to take screenshots of the entire Qt window containing the vtk<br>
&gt; scene. The solution with vtkWindowToImageFilter can only be used to take<br>
&gt; screenshots of the vtk scene not for my entire user interface.<br>
&gt;<br>
&gt; Thus, the screenshot process is made using Qt.<br>
&gt;<br>
&gt;<br>
&gt; ________________________________<br>
&gt; De : peterm &lt;<a href="mailto:madapeti@gmail.com">madapeti@gmail.com</a>&gt;<br>
&gt; À : <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
&gt; Envoyé le : Lundi 19 Septembre 2011 12h13<br>
&gt; Objet : Re: [vtkusers] Enable/Disable Offscreen rendering<br>
&gt;<br>
&gt; Dear James,<br>
&gt;<br>
&gt; vtkWindowToImageFilter can save the content of the selected render window.<br>
&gt; Actually how else did you manage to save the window content if not using<br>
&gt; it?<br>
&gt;<br>
&gt; Peter<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context:<br>
&gt; <a href="http://vtk.1045678.n5.nabble.com/Enable-Disable-Offscreen-rendering-tp4818" target="_blank">http://vtk.1045678.n5.nabble.com/Enable-Disable-Offscreen-rendering-tp4818</a><br>
&gt; 233p4818424.html Sent from the VTK - Users mailing list archive at<br>
&gt; Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</div></div><font color="#888888">--<br>
Clinton Stimpson<br>
Elemental Technologies, Inc<br>
Computational Simulation Software, LLC<br>
<a href="http://www.csimsoft.com" target="_blank">www.csimsoft.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div></div>