Skip to content

[Draft] Update from QT5.15 to QT6.9#285

Closed
guillaume-haerinck wants to merge 1 commit intoo3de:mainfrom
guillaume-haerinck:qt6
Closed

[Draft] Update from QT5.15 to QT6.9#285
guillaume-haerinck wants to merge 1 commit intoo3de:mainfrom
guillaume-haerinck:qt6

Conversation

@guillaume-haerinck
Copy link
Contributor

@guillaume-haerinck guillaume-haerinck commented Jul 8, 2025

What does this PR do?

Related to :

Upgrade the QT library version to QT6.9 while keeping changes made by O3DE when it makes sense

Repo O3DE Fork My temp Fork Changes outline
QImageFormats compare compare - Advanced support for TIFF file format
QBase compare compare - New PropagateStyleToChildren flag
- New ManualStyleSheet flag
- Styling rendering optimization
- Advanced layouting for tooltips
- MacOS ssl changes
- Tree view expand behavior changes
Qt5 compare compare - Update QT git modules to point to fork when required

What remains ?

  • O3DE CMake configure: With QT 6.9 (and not with QT 6.0) I ran into the following configuration issues that I wasn't able to fix yet.
 CMake Error in Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt:
  Cannot find source file:
    F:/o3de/build/External/MaterialEditor-e5b20b04/Code/MaterialEditor_autogen/L6L7XOLXOZ_/qrc_MaterialEditor.cpp

It seems that the resource files are not built into the right folders with the qt_add_resources command. You can play around by changing things in .o3de\3rdParty\packages\qt-6.9.1-rev1-windows for a faster iteration time than regenerating this package. The resource compilation is also handled in cmake/LYWrappers.cmake when looping for AUTORCC items

  • Fork of QT : The only notable changes are in QBase module and these would need to be properly tested one by one to know if we decide to keep the change or go with vanilla QT.

  • O3DE : The target branch for QT6 contains many changes but some remains to be tested. Code that is dodgy or commented out for now can be found by looking for // #QT6_TODO

  • QT Targets : I am currently omitting QtTools module from the build as it builds way more than we need and has issues (we only need it for translation support). We would also need to build QT against our version of Tiff and OpenSSL, but I had issues doing so. This will need to be looked at.

  • Platform : This is only for Windows for now, linux and mac will have to be looked at in parrallel or right after. In particular for linux we will want to build the QWayland module

How to test ?

Prerequisites are a valid python3 install, ninja, msvc and cmake

  • Clone this repository and the 3p-package-script next to each other.
  • From the 3p package scripts folder, open a terminal and run python .\build_package.py --search_path ..\..\3p-package-source qt-6.9.1-rev1-windows
  • The build will exist successfully, copy the generated package qt-6.9.1-rev1-windows.tar.xz located in this repo under packages
  • Copy it in C:\Users\YOUR_USER_NAME\.o3de\3rdParty\downloaded_packages
  • In your O3DE source build repository, modify BuiltInPackages to replace QT with your packages (don't forget to update the hash, was outputed in the console)
  • Configure the project with cmake and build

Signed-off-by: guillaume-haerinck <guillaume.haerinck@outlook.com>
@guillaume-haerinck guillaume-haerinck requested review from a team July 8, 2025 19:35
@guillaume-haerinck guillaume-haerinck marked this pull request as draft July 8, 2025 19:49
@guillaume-haerinck
Copy link
Contributor Author

guillaume-haerinck commented Jul 9, 2025

So I pushed a bit the testing and going directly to 6.9 is too much of a gap due to the fact that O3DE is accessing private QT5 headers in many places. I started to fix the O3DE build when targetting Qt 6.0.0 which would be a great in-between step. See o3de/o3de#19122

@byrcolin
Copy link

If going to 6.0 is easier transition and then to a higher is the plan then perhaps we should go to 6.8 instead of 6.9 because 6.8 is an LTS, 6.9 is not. But if 6.9 has something we absolutely want then I think we could justify it.

@guillaume-haerinck
Copy link
Contributor Author

Closed in favor of #293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants