[vtkusers] Newbie Needs example code for slider bars

Anja Ende anja.ende at googlemail.com
Fri Oct 13 10:49:51 EDT 2006


Hi Ashish,

In the project PRO file (this is used when you run qmake) command, you will
need to specify where the vt include and lib files are.

Below, I am attaching the relevant sections from my PRO file. As you can see
the LIBS directive tells QT the vtk libs I am using in my project and the
INCLUDEPATH also includes the path to the vtk includes.

LIBS += -lvtkWidgets \
-lQVTK \
-lvtktiff \
-lvtkjpeg \
-lvtkexpat \
-lvtkMPEG2Encode \
-lvtkIO \
-lvtkRendering \
-lvtkGraphics \
-lvtkImaging \
-lvtkftgl \
-lvtkfreetype \
-lvtkFiltering \
-lvtkCommon \
-lvtksys \
-lvtkDICOMParser \
-lXt \
-lvtkpng \
-lvtkzlib

INCLUDEPATH += ../src \
/usr/local/include/vtk-5.0

In addition you must export the QTDIR and PATH variables and set the
LD_LIBRARY_PATH . In Linux, the best place is the .bashrc file. I am not
sure about windows but probably it is the environment variables.

My .bashrc file looks like:

export QTDIR=/usr/local/Trolltech/Qt-4.1.4
export QTDIR

export PATH=$PATH:/usr/local/Trolltech/Qt-4.1.4/bin/
export PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/


I hope this helps you.

Cheers,
Anja

On 13/10/06, Ashish Singh <mrasingh at gmail.com> wrote:
>
> Even, I want to make a slider in my vtk application. I was planning to use
> Qt for that, but for some reason I cannot get Qt to run with vtk. How are
> you doing it, Anja? I have Qt 4.1.4 and VTK 5.0.2 installed on my
> workstation (windows xp pro x64). Both of them are running independently but
> I don't know how to use them together in the same application. How did you
> configure them?
>
> Thanks,
> Ashish
>
> On 10/13/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> > Hi Spencer,
> >
> > What GUI framework are you using for displaying the sliders? This should
> > be completely independent from vtk.
> >
> > I use Qt and use QSlider and it works fine.
> >
> > Cheers,Anja
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061013/b6ee1228/attachment.htm>


More information about the vtkusers mailing list