[Insight-users] qt designer and cmake (QtImageViewer)

Rudi Ratlos eugenius12345 at yahoo.com
Sun Jul 25 17:40:06 EDT 2004


Hi Luis,
thanks. But I have still the problem with uic. When I
run QtImageViewer, there is the file 'QtSlicerGUI.h'
missing, although cmake should generate it, no ? Here
is the cmake file I use. Thanks for any help.
Rudi

##################################################
PROJECT(QtSlicer)

INCLUDE (${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/FindGLU.cmake)


#
#  Find where ITK was Built or Installed.
#
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build VolviewPlugIns without ITK. 
Please set ITK_DIR.")
ENDIF(ITK_FOUND)




INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)

INCLUDE_DIRECTORIES(
 ${QT_INCLUDE_DIR}
 ${QtSlicer_BINARY_DIR}
 ${QtSlicer_SOURCE_DIR}
)



LINK_LIBRARIES(
 ${ITK_LIBRARIES}
 ${QT_QT_LIBRARY}
 ${QT_GL_LIBRARY}
 ${OPENGL_glu_LIBRARY}
 ${OPENGL_LIBRARY}
)

SET(QtSlicer_SRCS 
  QtSlicerTest.cxx
  QtGlSliceView.cxx
  QtSlicer.cxx
)

SET(QtSlicer_GUI_SRCS 
  QtSlicerGUI.ui
  QtSlicerHelpGUI.ui
)


SET(QtSlicer_MOC_SRCS 
  QtGlSliceView.h
)

IF(QT_WRAP_UI)
  QT_WRAP_UI(QtSlicer QtSlicer_HDRS  QtSlicer_SRCS 
QtSlicer_GUI_SRCS )
ENDIF(QT_WRAP_UI)

#IF(QT_WRAP_CPP)
  QT_WRAP_CPP(QtSlicer QtSlicer_SRCS
QtSlicer_MOC_SRCS)
#ENDIF(QT_WRAP_CPP)

ADD_DEFINITIONS(-DQT_DLL)

ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)

ADD_EXECUTABLE(QtSlicer QtSlicer_SRCS)

########################################################




--- Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
> Hi Rudi,
> 
> This is explained in detail in the ITK tutorials
> 
>     http://www.itk.org/HTML/Tutorials.htm
> 
> In particular in
> 
> "ITK and Graphical User Interface"
>
http://www.itk.org/CourseWare/Training/GettingStarted-IV.pdf
> 
> Instruction are available for using ITK along
> with FLTK as well as with Qt.
> 
> You will also find examples under
> 
>     InsightApplications/Auxiliary/QtImageViewer
>     InsightApplications/QtITK
> 
> 
> 
> Regards,
> 
> 
>     Luis
> 
> 
> 
> ------------------
> Rudi Ratlos wrote:
> > Hi guys,
> > I would like to moc with cmake a ui file generated
> by
> > qt designer. Does anyone have an idea how to force
> > cmake to take the ui file and moc it ?
> > Thanks guys
> > Rudi
> > 
> > 
> >
> 
> 
> 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


More information about the Insight-users mailing list