Using QVTKOpenGLWidget in Qt Quick 2

874 views Asked by At

Is it possible to use QVTKOpenGLWidget in a Qt Quick 2 application leveraging QML? I understand that it will be made to work with a vtkGenericOpenGLRenderWindow, but it just isn't clicking in my head so it would be brilliant if someone could post a small example of what is necessary to use QVTKOpenGLWidget in QML.

I have searched high and low and while I'm piecing things together as I go, I'm new to VTK.

1

There are 1 answers

0
tomj On BEST ANSWER

In short, no. QVTKOpenGLWidget is intended to be used with the Qt Widgets library, which is different from Qt Quick 2. But you can use it for inspiration for implementing something similar that will work with qml. Luckily for you, others have already done that: How to render programmatically a vtk item in qml?