[Insight-users] Re: Qt + ITK integration

Luis Ibanez luis.ibanez@kitware.com
Wed May 19 20:56:28 EDT 2004


Hi Venkat,


There is no real mistery for integrating ITK and QT.

No specific libraries are needed for this purpose.
All the necessary code is what you already found in

    InsightApplications/Auxiliary/QtImageViewer

You will find another example in

    InsightApplications/QtITK

that illustrates how to pass ITK events as Qt signal,
and how to use ITK Command/Observers as Qt slots.


----

The incompatibility between the libraries

         qaxserver.lib
         qt-mt331.lib

is not to be found in the ITK+Qt integration code.

It is very likely that mixing these two libraries
in *any* Qt pure application will lead you to similar
problems. (that is, if you remove all the ITK code,
the problem will still be there.)


I assume that you are finding duplicate symbols
at link time when you add qaxserver.lib.

Is that what is happenning  ?


(your attachement with linker errors didn't get
  to my mailbox...)


BTW are you making sure that you build your
application using the same compilation mode
everywhere  ?  (that is: Debug/Release...)


--


The reason why the QT libraries version have
been changing on CMake is the natural difficulty
for dealing with Qt multi-licenses.

You could easily overcome this problem by copying
the file


     CMake/Modules/FindQT.cmake


renaming it and modifying its content in order to
find the libraries that you need to use.



Please let us know what you find.



   Regards,


      Luis



----------------
Venkata wrote:

> Hello Luis,
> 
>  
> 
> We took Qtslicer application developed by ITK as an example for Qt + ITK 
> integration. Based on this application we developed our own application 
> that integrates Qt and ITK. As we are progressing in our application, we 
> are in need of many Qt libraries for our application functionality. At 
> one stage we are facing a clash between two Qt libraries (qaxserver.lib 
> and qt-mt331.lib).  As we observed qt-mt331.lib is used for Qt + ITK 
> integration and qaxserver.lib for the feature we want to implement to 
> make our application web-enabled. I wanted to know is qt-mt331.lib that 
> integrates Qt + ITK, because if I remove that library I am getting lot 
> of errors. Therefore I thought it is the main library that integrates Qt 
> and ITK.
> 
>  
> 
>  Do different versions of CMAKE use different Qt libraries for Qt + ITK 
> integration? When I observed CMake1.8 patch 1 it uses QT_QT_LIBRARY as 
> qt-mtedu322.lib and CMake1.8 patch 3 uses qt-mt331.lib instead of 
> qt-mtedu322.lib. Similarly I want to know is there any other library I 
> need to use for the integration and resolve the clash with 
> qaxserver.lib. For your reference I am attaching the LINKER errors.
> 
>  
> 
> Your response in this regard will be highly appreciated.
> 
>  
> 
> Thanks
> 
> -Venkat
> 
>  
> 
> * *
> 
>  
> 






More information about the Insight-users mailing list