Back to
Projects List
Transition Slicer Default Build from Qt5 to Qt6
Key Investigators
- Jean-Christophe Fillion-Robin (Kitware, USA)
- Sam Horvath (Kitware, USA)
- James Butler (Revvity, USA)
- Hans Johnson (University of Iowa, USA)
Project Description
This project focuses on updating Slicer’s build system, dependencies, and related infrastructure to support building, packaging, and distributing Slicer with Qt6.
This effort lays the groundwork for supporting native builds on macOS ARM systems.
Objective
- Ensure all Slicer dependencies can be built with Qt6.
- Enable building Slicer itself against Qt6.
- Tentative: Update infrastructure and build environments to support packaging and continuous integration with Qt6 builds.
Approach and Plan
-
Identify Suitable Qt6 Version: Evaluate supported Qt6 versions to determine the most compatible and stable version for Slicer (tentatively targeting Qt 6.9).
-
Test Qt6 Compatibility of Dependencies: Build Slicer’s external dependencies with Qt6, document any issues encountered, and work toward resolving them.
-
Enable Qt6 Build of Slicer: Support configuring Slicer with Slicer_REQUIRED_QT_VERSION=6.9
(or selected version) to enable Qt6-based builds.
-
Update Infrastructure and CI for Qt6 (Tentative)
- Update packaging scripts and build environments (e.g., Docker images, GitHub Actions runners) to support Qt6-based builds.
- Add CI jobs to test, build, and package Slicer against Qt6 on supported platforms (Linux, Windows, macOS ARM/x86_64).
- Validate the creation of functioning Slicer packages built with Qt6.
Progress and Next Steps
- Target Qt Version: Qt 6.9
- Initial focus is on enabling Slicer and its dependencies to build on macOS arm64 with Qt6. Work is ongoing across the main Slicer repository, key dependencies, and related infrastructure.
Status of Qt6 & macOS arm64 support
|
Status |
Progress |
What |
PythonQt |
⏳ |
95% |
Qt6 & macOS arm64 |
qRestAPI |
✅ |
100% |
Qt6 & macOS arm64 |
QtTesting |
⏳ |
95% |
Qt6 & macOS arm64 |
CTK |
⏳ |
5% |
Qt6 & macOS arm64 |
CTKAPPLAUNCHER |
|
|
Qt6 & macOS arm64 |
VTK |
✅ |
100% |
Qt6 & macOS arm64 |
Slicer |
|
|
Qt6 & macOS arm64 |
teem |
✅ |
100% |
macOS arm64 |
rapidjson |
✅ |
100% |
macOS arm64 |
OpenSSL |
✅ |
100% |
macOS arm64 |
Slicer Updates
- CMake and Build System
- PR-8501: ✅ Update minimum required CMake version from 3.16.3 to 3.20.6
- PR-8491: ⏳ Build cmake4 WORK IN PROGRESS WIP
- Dependency Updates
- teem
- PR-8500: ✅ Update teem from r6245 to r7265
- PR-8503: ✅ Update teem to fix windows build
- rapidjson
- PR-8502: ✅Update RapidJSON to latest revision
- PR-8508: ✅ Fix configuration on Windows by updating RapidJSON project installation
- Pull requests contributed to upstream
Tencent/rapidjson
: ⏳ PR-2343, ⏳ PR-2344
- OpenSSL
- PR-8504: ✅ OpenSSL 1.1.1w is needed to fix missing include
- PR-8513: ✅ Fix OpenSSL 1.1.1w build on macOS with non-system zlib
- Compiler Warning Fixes
- PR-8509: ✅ Fix deprecated declarations related to vtkStdString
- PR-8510: ✅ Fix unused variable warning in qMRMLSortFilterColorProxyModel
- Identified issues
- PR-8515: ✅ Ensure deepcopy is propagated in vtkMRMLSequenceBrowserNode::CopyContent
QtTesting Updates
- ⏳ Support for Qt6 being finalized
PythonQt Updates
- ⏳ commontk/PythonQt PR-90, ⏳ MeVisLab/pythonqt PR-269
- Qt6 Porting: Updated code to support Qt6, including replacing deprecated QVariant::Type with QMetaType and adding version checks for Qt5/Qt6 compatibility.
- C++17/20 Modernization: Refactored code to use modern C++ features as required by newer Qt versions (e.g., constexpr, noexcept, alignas, etc.).
- Compiler Detection Updates: Enhanced and updated compiler detection macros in qcompilerdetection.h for better support of recent compilers and platforms.
- Warning and Attribute Macros: Improved handling of compiler warnings and attributes, including support for new C++ attributes like [[nodiscard]], [[maybe_unused]], and [[deprecated]].
- Platform and Feature Checks: Added or updated macros for platform-specific and feature-specific checks, ensuring better cross-platform compatibility.
- General Maintenance: Bug fixes, code cleanup, and improved documentation/comments throughout the codebase.
simplecpp Updates (used by PythonQt wrapper generator)
- ⏳ PR-448: ENH: Add support to find Headers in Apple Frameworks
Illustrations
No response
Background and References