Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Combining Qt 5.4.2 and VTK 6.2.0 using CMake 3.2.3
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Combining Qt 5.4.2 and VTK 6.2.0 using CMake 3.2.3

Scheduled Pinned Locked Moved General and Desktop
qt5.4vtkcmakevisual studio
3 Posts 2 Posters 3.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Filippo_B
    wrote on 30 Jun 2015, 09:42 last edited by Filippo_B 7 Sept 2015, 12:08
    #1

    Hello everyone! I'm trying to use Qt 5.4 with the VTK 6.2 libraries. I'm not an expert and I follow every tutorial I've found but some doubts remain.
    This is what I've done:

    -Install Qt 5.4.2
    -Download VTK 6.2.0
    -Download CMake 3.2.3

    -Set up the source directory (C:\VTK\VTK-6.2.0\VTK-6.2.0) and the build directory (C:\VTK\VTKbuild) in CMake

    -Set up variable environment:
    QTDIR = C:\Qt\5.4
    Path = C:\CMake\cmake-3.2.3-win32-x86\bin;C:\Qt\5.4\msvc2013_64\bin

    -Press configure in CMake

    -Check the following options in CMake:
    VTK_Group_Qt = true
    BUILD_SHARED_LIBS = true

    -Added the following options in CMake:
    CMAKE_PREFIX_PATH = C:\Qt\5.4\msvc2013_64
    VTK_QT_VERSION = 5
    QT_QMAKE_EXECUTABLE = C:/Qt/5.4/msvc2013_64/bin/qmake.exe

    -Press configure
    -Press generate
    -Build the file VTK.sln with Visual Studio 2013 in release mode

    Has anyone tried this method? It's correct? I'm still trying to figure out how to use VTK libraries VTK in a Qt project but for now I just need to know if the procedure is correct. Thank you for your help!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Jul 2015, 09:10 last edited by
      #2

      Hi and welcome to devnet,

      From a quick look it seems good except for two points:

      1. AFAIK, your don't need to set QTDIR.
      2. Don't modify PATH to add Qt in it, doing so means that all other software on your computer that uses Qt dlls would pick these and it's not something you want.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply 9 Jul 2015, 07:35
      0
      • S SGaist
        5 Jul 2015, 09:10

        Hi and welcome to devnet,

        From a quick look it seems good except for two points:

        1. AFAIK, your don't need to set QTDIR.
        2. Don't modify PATH to add Qt in it, doing so means that all other software on your computer that uses Qt dlls would pick these and it's not something you want.
        F Offline
        F Offline
        Filippo_B
        wrote on 9 Jul 2015, 07:35 last edited by
        #3

        @SGaist Thank you! I'm sorry if i reply so late!
        Now i try to follow your advices. ;)

        1 Reply Last reply
        0

        1/3

        30 Jun 2015, 09:42

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved