Qt – Getting the VTK widget working with Qt Creator

qtqt-creatorvtk

I want to use the VTK widget in Qt Creator. So, I downloaded and installed Qt Creator 4, and in /usr/lib/qt4/plugins/designer there is now the file libQVTKWidgetPlugin.so. However, on starting a new Qt Creator Widgets project, and entering the Design tab, there are no additional widgets listed on the left, only the default ones such as Push Button, Label, etc. What additional steps do I need to show the VTK widget so that I can just drag and drop it onto the GUI I am building?

Best Answer

Well, I worked with VTK and Qt almost a year ago, I hope that the refernces I have still valid nowadays.

If so, you should go under C:\vtk\VTK5.10.1\vs10\bin\Release (or a similar path, depending on the version of VTK you've installed), and localize two files: QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll. If they are there, there are good chances you've built VTK properly.

Now copy those files in C:\Qt\4.x.x\plugins\designer.

if everything goes well, then open the QT designer. You will find the VTK WINDOW WIDGET at the bottom of the qt widget list like this snapshot:

enter image description here

Reference: http://guitarcplusplus.blogspot.it/2013/02/itk-vtk-qt-on-window-7-64bit-and-visual.html

Related Topic