[vtkusers] VTK6 - Qt5 : Screenshot of a QVTKWidget using "grab()"

Malsoaz James jmalsoaz at yahoo.fr
Mon May 12 09:35:28 EDT 2014


I did not find the solution to use the "grab()" method but I manage to make screenshots using my own grab method based on what I found in ctk library.

I'm giving the source code if it can help someone:



Le Mercredi 7 mai 2014 17h29, Malsoaz James <jmalsoaz at yahoo.fr> a écrit :
 
Hi,

I'm trying to move my projects to new libs, ie VTK 6.1.0 vs VTK 5.6.0 and Qt 5.2.1 vs Qt 4.8.4. Unfortunately I have numerous bugs coming with these changes.

One of them is related to screenshot of a QVTKWidget. I'm using the "grab()" method of QWidget to get a screenshot of my application. Unfortunately the VTK scenes appear in black. I was using the same method with previous releases of libs with success.

Do you have any idea to solve the problem? I have the same results on Windows and Linux. Not tested yet on Mac OS X.
Do you think I need to play with options like VTK_USE_OSMESA to compile a proper VTK?

Best.
James
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140512/2635c331/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GrabWidget.cpp
Type: text/x-c++src
Size: 2344 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140512/2635c331/attachment.cpp>


More information about the vtkusers mailing list