I haven&#39;t spent time investigating. However, I wonder if playing with the following flags could make a difference:<div> - <span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: medium; "><span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: monospace; font-size: 11px; line-height: 13px; word-spacing: 5px; ">Qt::WA_PaintOnScreen</span></span><br>

 - <span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: monospace; font-size: 11px; line-height: 13px; word-spacing: 5px; ">Qt::WA_OpaquePaintEvent</span></div><div> - <span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: monospace; font-size: 11px; line-height: 13px; word-spacing: 5px; ">Qt::WA_NoSystemBackground</span></div>

<div> - <span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: monospace; font-size: 11px; line-height: 13px; word-spacing: 5px; ">Qt::WA_PaintUnclipped</span></div><div><br></div><div>Julien.</div><div>

<br><div class="gmail_quote">On Tue, Sep 20, 2011 at 10:17 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;">

<div class="im">On Monday, September 19, 2011 11:30:58 pm Julien Finet wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; QPixmap::grabWidget() can fail with QGLWidgets or QVTKWidgets, especially<br>
&gt; if there is another window in front of the widgets (on Ubuntu with &quot;No<br>
&gt; Effects&quot;) .<br>
&gt;<br>
&gt; However QGLWidget::grabFrameBuffer() / QVTKWidgets::cachedImage work fine.<br>
&gt;<br>
</div>&gt; In CTK &lt;<a href="http://www.commontk.org/index.php/Main_Page" target="_blank">http://www.commontk.org/index.php/Main_Page</a>&gt;, we handle that<br>
<div class="im">&gt; problem:<br>
&gt;  - ctk::grabWidget for QGLWidgets:<br>
&gt; <a href="https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkWidgetsUtils.cp" target="_blank">https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkWidgetsUtils.cp</a><br>
</div>&gt; p - ctk::grabVTKWidget for QVTKWidgets:<br>
<div class="im">&gt; <a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/" target="_blank">https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/</a><br>
&gt; ctkVTKWidgetsUtils.cpp<br>
<br>
</div>Do you know why this method works for you and not the code that is already in<br>
QVTKWidget::paintEvent() ?  It appears to work off the back buffer instead of<br>
the front buffer.  I thought even the back buffer on some machines had garbage<br>
with other windows in front.<br>
<br>
Clint<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt; Hth,<br>
&gt; Julien.<br>
&gt;<br>
&gt; On Mon, Sep 19, 2011 at 10:40 AM, Clinton Stimpson<br>
&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;wrote:<br>
&gt; &gt; To take a snapshot of the app, QPixmap::grabWidget() is supposed to work.<br>
&gt; &gt; Have you tried that?<br>
&gt; &gt; QVTKWidget will take the onscreen pixels and put it in that QPixmap,<br>
&gt; &gt; while the<br>
&gt; &gt; other QWidgets will paint themselves into the QPixmap.<br>
&gt; &gt; If you want to use offscreen, I suppose you could set the offscreen flag,<br>
&gt; &gt; then<br>
&gt; &gt; still call QPixmap::grabWidget().<br>
&gt; &gt;<br>
&gt; &gt; Clint<br>
&gt; &gt;<br>
&gt; &gt; On Monday, September 19, 2011 05:56:17 am Malsoaz James wrote:<br>
&gt; &gt; &gt; I would like to take screenshots of the entire Qt window containing the<br>
&gt; &gt;<br>
&gt; &gt; vtk<br>
&gt; &gt;<br>
&gt; &gt; &gt; scene. The solution with vtkWindowToImageFilter can only be used to<br>
&gt; &gt; &gt; take screenshots of the vtk scene not for my entire user interface.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thus, the screenshot process is made using Qt.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ________________________________<br>
&gt; &gt; &gt; De : peterm &lt;<a href="mailto:madapeti@gmail.com">madapeti@gmail.com</a>&gt;<br>
&gt; &gt; &gt; À : <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
&gt; &gt; &gt; Envoyé le : Lundi 19 Septembre 2011 12h13<br>
&gt; &gt; &gt; Objet : Re: [vtkusers] Enable/Disable Offscreen rendering<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Dear James,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; vtkWindowToImageFilter can save the content of the selected render<br>
&gt; &gt;<br>
&gt; &gt; window.<br>
&gt; &gt;<br>
&gt; &gt; &gt; Actually how else did you manage to save the window content if not<br>
&gt; &gt; &gt; using it?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Peter<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; &gt; View this message in context:<br>
&gt; &gt; <a href="http://vtk.1045678.n5.nabble.com/Enable-Disable-Offscreen-rendering-tp481" target="_blank">http://vtk.1045678.n5.nabble.com/Enable-Disable-Offscreen-rendering-tp481</a><br>
&gt; &gt; 8<br>
&gt; &gt;<br>
&gt; &gt; &gt; 233p4818424.html Sent from the VTK - Users mailing list archive at<br>
&gt; &gt; &gt; Nabble.com.<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Visit other Kitware open-source projects at<br>
&gt; &gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; &gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Clinton Stimpson<br>
&gt; &gt; Elemental Technologies, Inc<br>
&gt; &gt; Computational Simulation Software, LLC<br>
&gt; &gt; <a href="http://www.csimsoft.com" target="_blank">www.csimsoft.com</a><br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt; &gt;<br>
&gt; &gt; Visit other Kitware open-source projects at<br>
&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt;<br>
&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt; &gt;<br>
&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">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>
</div></div></blockquote></div><br></div>