VTK/Tutorials/QtSetup: Difference between revisions

From KitwarePublic
< VTK‎ | Tutorials
Jump to navigationJump to search
Line 25: Line 25:
Append the environment variable PATH to add
Append the environment variable PATH to add
  C:\Qt\4.X.X\bin
  C:\Qt\4.X.X\bin
C:\VTKbuild\bin\Release
(or \bin\Debug if that is how you have built VTK)


Copy QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll from C:\bin\VTK\bin\Debug to C:\Qt\4.7.0\plugins\designer
Copy QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll from C:\bin\VTK\bin\Debug to C:\Qt\4.7.0\plugins\designer

Revision as of 02:14, 3 December 2010

All systems

You must turn on the following options in the advanced VTK build configuration:

VTK_USE_QT 
VTK_USE_GUISUPPORT
BUILD_SHARED_LIBS

You MUST build in Release mode.

Linux

sudo yum install qt*

(or equivalent)

To use QVTKWidget in the QT4 Designer, you must:

sudo cp ~/bin/VTK/bin/libQVTKWidgetPlugin.so /usr/lib/qt4/plugins/designer

Windows

Download and install Qt. http://qt.nokia.com/downloads/windows-cpp-vs2008

Add a new environment variable:

QTDIR = C:\Qt\4.X.X (or whatever path you installed QT)

Append the environment variable PATH to add

C:\Qt\4.X.X\bin
C:\VTKbuild\bin\Release
(or \bin\Debug if that is how you have built VTK)

Copy QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll from C:\bin\VTK\bin\Debug to C:\Qt\4.7.0\plugins\designer

Using the widget

When you open QtDesigner, you will see a new title in the widget box called QVTK. Inside of it is the QVTKWidget.