I haven'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"><<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>></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>
> Hi,<br>
><br>
> QPixmap::grabWidget() can fail with QGLWidgets or QVTKWidgets, especially<br>
> if there is another window in front of the widgets (on Ubuntu with "No<br>
> Effects") .<br>
><br>
> However QGLWidget::grabFrameBuffer() / QVTKWidgets::cachedImage work fine.<br>
><br>
</div>> In CTK <<a href="http://www.commontk.org/index.php/Main_Page" target="_blank">http://www.commontk.org/index.php/Main_Page</a>>, we handle that<br>
<div class="im">> problem:<br>
> - ctk::grabWidget for QGLWidgets:<br>
> <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>> p - ctk::grabVTKWidget for QVTKWidgets:<br>
<div class="im">> <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>
> 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>
><br>
> Hth,<br>
> Julien.<br>
><br>
> On Mon, Sep 19, 2011 at 10:40 AM, Clinton Stimpson<br>
<<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>>wrote:<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,<br>
> > 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,<br>
> > then<br>
> > still call QPixmap::grabWidget().<br>
> ><br>
> > Clint<br>
> ><br>
> > On Monday, September 19, 2011 05:56:17 am Malsoaz James wrote:<br>
> > > I would like to take screenshots of the entire Qt window containing the<br>
> ><br>
> > vtk<br>
> ><br>
> > > scene. The solution with vtkWindowToImageFilter can only be used to<br>
> > > take screenshots of the vtk scene not for my entire user interface.<br>
> > ><br>
> > > Thus, the screenshot process is made using Qt.<br>
> > ><br>
> > ><br>
> > > ________________________________<br>
> > > De : peterm <<a href="mailto:madapeti@gmail.com">madapeti@gmail.com</a>><br>
> > > À : <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> > > Envoyé le : Lundi 19 Septembre 2011 12h13<br>
> > > Objet : Re: [vtkusers] Enable/Disable Offscreen rendering<br>
> > ><br>
> > > Dear James,<br>
> > ><br>
> > > vtkWindowToImageFilter can save the content of the selected render<br>
> ><br>
> > window.<br>
> ><br>
> > > Actually how else did you manage to save the window content if not<br>
> > > using it?<br>
> > ><br>
> > > Peter<br>
> > ><br>
> > > --<br>
> ><br>
> > > View this message in context:<br>
> > <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>
> > 8<br>
> ><br>
> > > 233p4818424.html Sent from the VTK - Users mailing list archive at<br>
> > > Nabble.com.<br>
> > > _______________________________________________<br>
> > > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> > ><br>
> > > Visit other Kitware open-source projects at<br>
> > > <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:<br>
> > > <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>
> ><br>
> > --<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>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <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:<br>
> > <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>
<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>