[vtkusers] Working with VTK and Qt in Windows without Visual Studio

Luigi Laneve luigi_laneve at hotmail.com
Sat Sep 10 07:13:27 EDT 2011


Hi,
CMakeList parser can be certainly a solution.
You can also integrate Qt and VTK by means of  the QtCreator *.pro file that stores the same information of MS *.sln and *.vcproj files.You must include in this file the following information:- Additional Include  path: (INCLUDEPATH)- Release and Debug Additional Library path: (Release:QMAKE_LIBDIR and Debug:QMAKE_LIBDIR)- Additional Libraries: (LIBS)
Then, create a form application in qt Creator;add a QVTKWidget into the form;add the following lines to the *.pro file (use your VTK paths)
-----------------------------------------------------INCLUDEPATH += ext/inc/VTK 
Release: QMAKE_LIBDIR += ext/lib/VTK/releaseDebug: QMAKE_LIBDIR +=  ext/lib/VTK/debug
LIBS += 	vtkRendering.lib \		vtkVolumeRendering.lib \		vtkInfovis.lib \		vtkViews.lib \		vtkHybrid.lib \		vtksqlite.lib \		vtkpng.lib \		vtktiff.lib \		vtkzlib.lib \		vtkjpeg.lib \		vtkexpat.lib \		vfw32.lib \		vtkGraphics.lib \		vtkverdict.lib \		vtkImaging.lib \		vtkFiltering.lib \		vtkCommon.lib \		vtksys.lib \		vtkIO.lib \		vtkDICOMParser.lib \		vtkNetCDF.lib \		vtkmetaio.lib \		QVTK.lib \		QVTKWidgetPlugin.lib \		comctl32.lib \		vtkftgl.lib \		vtkfreetype.lib \		wsock32.lib \
-----------------------------------------------------
In this manner you can extract the vtkRenderWindow form ui object of QMainWindow derived Class.
Cheers,
Luigi.





> Date: Fri, 9 Sep 2011 13:30:38 -0400
> From: drescherjm at gmail.com
> To: fmilano at gmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] Working with VTK and Qt in Windows without Visual	Studio
> 
> On Fri, Sep 9, 2011 at 1:25 PM, Federico Milano <fmilano at gmail.com> wrote:
> > Hi. I'm trying to work in Windows using VTK and Qt, but without using Visual
> > Studio...after reading a bit it seems that's really hard. What could you
> > recommend me?
> >
> > Any suggestion will help.
> >
> 
> QTCreator handles CMakeLists.txt so I would recommend starting there.
> 
> John
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK 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/20110910/f258d8bd/attachment.htm>


More information about the vtkusers mailing list