Difference between revisions of "Documentation/Labs/Qt5-and-VTK8"
From Slicer Wiki
Line 7: | Line 7: | ||
* VTK: | * VTK: | ||
− | ** | + | ** Support for QVTKWidget/QVTKWidget2: Done |
− | ** | + | ** QML support for VTK render windows: To Be Done - Not yet required by Slicer core - We experimented with few approaches internally and some possible approaches. |
− | |||
− | |||
− | |||
− | |||
− | * CTK support: | + | * CTK support: Done |
+ | |||
+ | * ITKv4: NA | ||
+ | |||
+ | * PythonQt: Done | ||
* Slicer build system upgrade: To be done | * Slicer build system upgrade: To be done | ||
+ | ** Add a switch similar to what is done in CTK (Add option Slicer_QT_VERSION that can be set to either 4 or 5) | ||
+ | ** Update use of QT4_* macros (see below) | ||
+ | ** Update packaging scripts (SlicerBlockInstallQt.cmake, SlicerCPackBundleFixup.cmake) | ||
+ | ** Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build ) | ||
+ | ** Update Slicer build instruction on developer wiki | ||
+ | |||
+ | |||
+ | * Usage of QT4_ macros: | ||
+ | |||
+ | <pre> | ||
+ | $ ack --cmake -i "qt4" | ||
+ | CMake/SlicerMacroBuildModuleQtLibrary.cmake | ||
+ | 116: QT4_WRAP_CPP(MODULEQTLIBRARY_MOC_OUTPUT ${MODULEQTLIBRARY_MOC_SRCS}) | ||
+ | 118: QT4_WRAP_UI(MODULEQTLIBRARY_UI_CXX ${MODULEQTLIBRARY_UI_SRCS}) | ||
+ | 121: QT4_ADD_RESOURCES(MODULEQTLIBRARY_QRC_SRCS ${MODULEQTLIBRARY_RESOURCES}) | ||
+ | 127: QT4_ADD_RESOURCES(MODULEQTLIBRARY_QRC_SRCS ${Slicer_LOGOS_RESOURCE}) | ||
+ | |||
+ | CMake/SlicerMacroTranslation.cmake | ||
+ | 83: QT4_CREATE_TRANSLATION(QM_OUTPUT_FILES ${FILES_TO_TRANSLATE} ${TS_FILES}) | ||
+ | 85: QT4_ADD_TRANSLATION(QM_OUTPUT_FILES ${TS_FILES}) | ||
+ | |||
+ | CMake/SlicerMacroBuildQtModule.cmake | ||
+ | 132: QT4_WRAP_CPP(LOADABLEMODULE_MOC_OUTPUT ${LOADABLEMODULE_MOC_SRCS}) | ||
+ | 134: QT4_WRAP_UI(LOADABLEMODULE_UI_CXX ${LOADABLEMODULE_UI_SRCS}) | ||
+ | 137: QT4_ADD_RESOURCES(LOADABLEMODULE_QRC_SRCS ${LOADABLEMODULE_RESOURCES}) | ||
+ | 143: QT4_ADD_RESOURCES(LOADABLEMODULE_QRC_SRCS ${Slicer_LOGOS_RESOURCE}) | ||
+ | |||
+ | CMake/SlicerMacroBuildApplication.cmake | ||
+ | 141: QT4_WRAP_CPP(SLICERAPPLIB_MOC_OUTPUT ${SLICERAPPLIB_MOC_SRCS}) | ||
+ | 142: QT4_WRAP_UI(SLICERAPPLIB_UI_CXX ${SLICERAPPLIB_UI_SRCS}) | ||
+ | 144: QT4_ADD_RESOURCES(SLICERAPPLIB_QRC_SRCS ${SLICERAPPLIB_RESOURCES}) | ||
+ | |||
+ | CMake/SlicerBlockFindQtAndCheckVersion.cmake | ||
+ | 22:# The CMake code used to find Qt4 has been factored out into this CMake script so that | ||
+ | 27: find_package(Qt4) | ||
+ | 28: if(NOT QT4_FOUND) | ||
− | + | CMake/SlicerMacroBuildBaseQtLibrary.cmake | |
+ | 35:# using QT4_WRAP_CPP CMake macro | ||
+ | 38:# QT4_WRAP_UI CMake macro | ||
+ | 47:# using QT4_ADD_RESOURCES | ||
+ | 141: QT4_WRAP_CPP(SLICERQTBASELIB_MOC_OUTPUT ${SLICERQTBASELIB_MOC_SRCS}) | ||
+ | 142: QT4_WRAP_UI(SLICERQTBASELIB_UI_CXX ${SLICERQTBASELIB_UI_SRCS}) | ||
+ | 144: QT4_ADD_RESOURCES(SLICERQTBASELIB_QRC_SRCS ${SLICERQTBASELIB_RESOURCES}) | ||
+ | 147: QT4_ADD_RESOURCES(SLICERQTBASELIB_QRC_SRCS ${Slicer_SOURCE_DIR}/Resources/qSlicer.qrc) | ||
+ | |||
+ | Modules/Loadable/Models/Testing/Cxx/CMakeLists.txt | ||
+ | 15:QT4_GENERATE_MOCS( | ||
+ | |||
+ | Modules/Loadable/Transforms/Testing/Cxx/CMakeLists.txt | ||
+ | 9:QT4_GENERATE_MOCS( | ||
+ | |||
+ | Modules/Loadable/VolumeRendering/Testing/Cxx/CMakeLists.txt | ||
+ | 36:QT4_GENERATE_MOCS( | ||
+ | |||
+ | Libs/MRML/Widgets/CMakeLists.txt | ||
+ | 363:QT4_WRAP_CPP(MRMLWidgets_MOC_CXX ${MRMLWidgets_MOC_SRCS}) | ||
+ | 364:QT4_WRAP_UI(MRMLWidgets_UI_CXX ${MRMLWidgets_UI_SRCS}) | ||
+ | 365:QT4_ADD_RESOURCES(MRMLWidgets_QRC_CXX ${MRMLWidgets_QRC_SRCS}) | ||
+ | |||
+ | Libs/MRML/Widgets/Testing/CMakeLists.txt | ||
+ | 139:QT4_WRAP_CPP(Tests_MOC_CXX ${Tests_MOC_SRCS}) | ||
+ | 140:QT4_GENERATE_MOCS( | ||
+ | |||
+ | CMakeLists.txt | ||
+ | 570:# Module name should be specified as they appear in FindQt4.cmake | ||
+ | |||
+ | Base/QTCore/Testing/Cxx/CMakeLists.txt | ||
+ | 37: QT4_GENERATE_MOCS( | ||
+ | 42: QT4_GENERATE_MOCS( | ||
+ | 49: QT4_GENERATE_MOCS( | ||
+ | 54: QT4_ADD_RESOURCES(Tests Resources/${KIT}Testing.qrc) | ||
+ | 60: list(APPEND KIT_TEST_TARGET_LIBRARIES Qt4::QtTest) | ||
− | + | Base/QTGUI/Testing/Cxx/CMakeLists.txt | |
+ | 45: QT4_GENERATE_MOCS(${KIT_TEST_MOC_SRCS}) | ||
+ | 48: QT4_ADD_RESOURCES(Tests Resources/${KIT}Testing.qrc) | ||
+ | </pre> | ||
+ | == References == | ||
* Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html | * Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html |
Revision as of 19:40, 16 August 2016
Home < Documentation < Labs < Qt5-and-VTK8This page will document experiments related to the upgrade of Slicer base to Qt5.
References
Progress
- VTK:
- Support for QVTKWidget/QVTKWidget2: Done
- QML support for VTK render windows: To Be Done - Not yet required by Slicer core - We experimented with few approaches internally and some possible approaches.
- CTK support: Done
- ITKv4: NA
- PythonQt: Done
- Slicer build system upgrade: To be done
- Add a switch similar to what is done in CTK (Add option Slicer_QT_VERSION that can be set to either 4 or 5)
- Update use of QT4_* macros (see below)
- Update packaging scripts (SlicerBlockInstallQt.cmake, SlicerCPackBundleFixup.cmake)
- Update build script to support qt5 (see https://github.com/jcfr/qt-easy-build )
- Update Slicer build instruction on developer wiki
- Usage of QT4_ macros:
$ ack --cmake -i "qt4" CMake/SlicerMacroBuildModuleQtLibrary.cmake 116: QT4_WRAP_CPP(MODULEQTLIBRARY_MOC_OUTPUT ${MODULEQTLIBRARY_MOC_SRCS}) 118: QT4_WRAP_UI(MODULEQTLIBRARY_UI_CXX ${MODULEQTLIBRARY_UI_SRCS}) 121: QT4_ADD_RESOURCES(MODULEQTLIBRARY_QRC_SRCS ${MODULEQTLIBRARY_RESOURCES}) 127: QT4_ADD_RESOURCES(MODULEQTLIBRARY_QRC_SRCS ${Slicer_LOGOS_RESOURCE}) CMake/SlicerMacroTranslation.cmake 83: QT4_CREATE_TRANSLATION(QM_OUTPUT_FILES ${FILES_TO_TRANSLATE} ${TS_FILES}) 85: QT4_ADD_TRANSLATION(QM_OUTPUT_FILES ${TS_FILES}) CMake/SlicerMacroBuildQtModule.cmake 132: QT4_WRAP_CPP(LOADABLEMODULE_MOC_OUTPUT ${LOADABLEMODULE_MOC_SRCS}) 134: QT4_WRAP_UI(LOADABLEMODULE_UI_CXX ${LOADABLEMODULE_UI_SRCS}) 137: QT4_ADD_RESOURCES(LOADABLEMODULE_QRC_SRCS ${LOADABLEMODULE_RESOURCES}) 143: QT4_ADD_RESOURCES(LOADABLEMODULE_QRC_SRCS ${Slicer_LOGOS_RESOURCE}) CMake/SlicerMacroBuildApplication.cmake 141: QT4_WRAP_CPP(SLICERAPPLIB_MOC_OUTPUT ${SLICERAPPLIB_MOC_SRCS}) 142: QT4_WRAP_UI(SLICERAPPLIB_UI_CXX ${SLICERAPPLIB_UI_SRCS}) 144: QT4_ADD_RESOURCES(SLICERAPPLIB_QRC_SRCS ${SLICERAPPLIB_RESOURCES}) CMake/SlicerBlockFindQtAndCheckVersion.cmake 22:# The CMake code used to find Qt4 has been factored out into this CMake script so that 27: find_package(Qt4) 28: if(NOT QT4_FOUND) CMake/SlicerMacroBuildBaseQtLibrary.cmake 35:# using QT4_WRAP_CPP CMake macro 38:# QT4_WRAP_UI CMake macro 47:# using QT4_ADD_RESOURCES 141: QT4_WRAP_CPP(SLICERQTBASELIB_MOC_OUTPUT ${SLICERQTBASELIB_MOC_SRCS}) 142: QT4_WRAP_UI(SLICERQTBASELIB_UI_CXX ${SLICERQTBASELIB_UI_SRCS}) 144: QT4_ADD_RESOURCES(SLICERQTBASELIB_QRC_SRCS ${SLICERQTBASELIB_RESOURCES}) 147: QT4_ADD_RESOURCES(SLICERQTBASELIB_QRC_SRCS ${Slicer_SOURCE_DIR}/Resources/qSlicer.qrc) Modules/Loadable/Models/Testing/Cxx/CMakeLists.txt 15:QT4_GENERATE_MOCS( Modules/Loadable/Transforms/Testing/Cxx/CMakeLists.txt 9:QT4_GENERATE_MOCS( Modules/Loadable/VolumeRendering/Testing/Cxx/CMakeLists.txt 36:QT4_GENERATE_MOCS( Libs/MRML/Widgets/CMakeLists.txt 363:QT4_WRAP_CPP(MRMLWidgets_MOC_CXX ${MRMLWidgets_MOC_SRCS}) 364:QT4_WRAP_UI(MRMLWidgets_UI_CXX ${MRMLWidgets_UI_SRCS}) 365:QT4_ADD_RESOURCES(MRMLWidgets_QRC_CXX ${MRMLWidgets_QRC_SRCS}) Libs/MRML/Widgets/Testing/CMakeLists.txt 139:QT4_WRAP_CPP(Tests_MOC_CXX ${Tests_MOC_SRCS}) 140:QT4_GENERATE_MOCS( CMakeLists.txt 570:# Module name should be specified as they appear in FindQt4.cmake Base/QTCore/Testing/Cxx/CMakeLists.txt 37: QT4_GENERATE_MOCS( 42: QT4_GENERATE_MOCS( 49: QT4_GENERATE_MOCS( 54: QT4_ADD_RESOURCES(Tests Resources/${KIT}Testing.qrc) 60: list(APPEND KIT_TEST_TARGET_LIBRARIES Qt4::QtTest) Base/QTGUI/Testing/Cxx/CMakeLists.txt 45: QT4_GENERATE_MOCS(${KIT_TEST_MOC_SRCS}) 48: QT4_ADD_RESOURCES(Tests Resources/${KIT}Testing.qrc)
References
- Qt 4.8 support schedule info: http://slicer-devel.65872.n3.nabble.com/Fwd-Qt-4-8-x-support-extended-out-by-a-year-td4033248.html