[vtkusers] Very basic doubt of using vtk in c++

David Doria daviddoria+vtk at gmail.com
Wed Feb 10 08:20:37 EST 2010


On Wed, Feb 10, 2010 at 7:56 AM, KS Jothybasu <jothybasu at gmail.com> wrote:

> Hi all,
>
> Don't get irritated by this basic question, because I have never used C/C++
> (but I could understand the code).
>
> Now I want to slowly switch to c++ from python. So, as a first step I
> downloaded Qt creator and copied some vtk examples and tried to run , but it
> says no header files
> found. I have installed vtk 5.4.2. Is there anything to be done, like
> seiing the path,etc....
>
>
> Many thanks
>
> Jothy
>
>
There are a few things you must turn on in your VTK build.
http://www.vtk.org/Wiki/VTK/Examples#Qt

<http://www.vtk.org/Wiki/VTK/Examples#Qt>If you just install a pre-build
version of VTK, I'm not sure if these things are already on?

To use Qt with CMake, you have to add:


FIND_PACKAGE(Qt4 REQUIRED)

INCLUDE(${QT_USE_FILE}

to your CMakeLists.txt file. I do not use Qt Creator, so I can't help you
with that. What I have done is use Qt Designer to make a .ui file and then
use it with a VTK program. There are some more tricky things to do in the
CMakeLists.txt for that - I will post them today.

Try a couple of these things and let us know if you're still stuck.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100210/ed2c6c16/attachment.htm>


More information about the vtkusers mailing list