[vtkusers] QVTKWIDEGET2

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Jan 9 02:50:21 EST 2018


Den 9 jan. 2018 2:26 fm skrev "舞法舞天" <278124177 at qq.com>:

Hi
QVTKWidget2 was deprecated for VTK 8.1 and will be removed in a future
version. So what should i use to instead qvtkwidget2?


That would be QVTKOpenGLWidget, which is based on the QOpenGLWidgetof Qt 5.

See

    https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html

and

  https://lorensen.github.io/VTKExamples/site/Cxx/Qt/RenderWindowNoUiFile/

for a very basic example.

More Qt examples at

  https://lorensen.github.io/VTKExamples/site/Cxx/#qt

Take note that with the new QVTKOpenGLWidget, you need to set the default
QSurfaceFormat before creating your Qapplication. The examples docs show
how.

HTH, Elvis


_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180109/9e4b4c8b/attachment.html>


More information about the vtkusers mailing list