Install QVTK widget as a plugin

The QVTK Widget is one of the main 'bridges' from Qt to VTK (Titan). It's a widget that shows a OpenGL representation of some kind and it allows a titan data structure (vtkTree, vtkGraph) to be displayed in a vtkView and it translates Qt events (mouse click, move,etc) into VTK events.

The first item to address is to make sure the QVTK widget is compiled as a plugin

In the VTK CMake you should already have the QVTK widget turned on "VTK_USE_QVTK".

Now you must install that widget as a plugin to the Qt Designer application. This is a manual process but you only need to do it once. Here's the instructions:

  • Windows
    • Go to your VTK build directory, go into the release directory (if you haven't compiled VTK in release yet, you will need to do that now :)
    • Find QVTKWidgetPlugin.dll and move that file into you designer plugins folder (usually something like C:\Qt\4.2.3\plugins\designer)
    • Restart designer. You should have the QVTK widget as an option in the very bottom left toolbar of designer now.


  • Linux
    • Go to your VTK build directory, go into the release directory (if you haven't compiled VTK in release yet, you will need to do that now :)
    • Find QVTKWidgetPlugin.so and move that file into you designer plugins folder (usually something like \home\bob\software\Qt\4.2.3\plugins\designer)
    • Restart designer. You should have the QVTK widget as an option in the very bottom left toolbar of designer now.


  • MAC (can someone please fill this in?)
    • Go to your VTK build directory, go into the release directory (if you haven't compiled VTK in release yet, you will need to do that now :)
    • Find QVTKWidgetPlugin.so and move that file into you designer plugins folder (usually something like \home\bob\software\Qt\4.2.3\plugins\designer)
    • Restart designer. You should have the QVTK widget as an option in the very bottom left toolbar of designer now.

你可能感兴趣的:(Install QVTK widget as a plugin)