安装QVTKWidget插件时出错

时间:2012-12-06 08:55:34

标签: qt vtk itk

枝, 我是VTK的新手。我想在Qt设计器中使用QVTKPluginWidget。 我正在使用Visual Studio 2008和MSVC编译器 CMake- 2.8.10.1 Qt版本-4.8.3 VTK - 5.0

根据VTK用户指南,我们必须使用Cmake配置VTK Lib 几个选项,如,

VTK_USE_GUISUPPORT=Turn On
configure
Desired Qt version cmake take itself
configure
then
set qt_qmake_executable
ON Build Example
configure


after doing this i am getting this warning in Cmake
CMake Warning (dev) at GUISupport/Qt/CMakeLists.txt:113 (ADD_LIBRARY):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "QVTKWidgetPlugin" links to some libraries for which the
  linker must search:

    vfw32, opengl32

  and other libraries with known full path:

    C:/Qt/4.8.3/lib/QtGuid4.lib
    E:/DebugLibrary/VtkBin/bin/Debug/vtkRendering.lib

  CMake is adding directories in the second list to the linker search path
in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003"
for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

Generating done

然后必须在Visual Studio中构建这个库然后复制 插件/设计器文件夹中的QVTKPluginWidget.dll。 然后我们应该在设计师

中获得QVTKWidget

但是在完成这个过程之后,我没有在设计师那里得到它。亲切的帮助 我

1 个答案:

答案 0 :(得分:0)

您必须使用BUILD_SHARED_LIBS = ON构建VTK(如此处所述http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup)以使用Designer中的小部件。