Recently, while developing ARM applications, I used Qt version 6.2 to cross-compile the source code. The compilation went smoothly and quickly. However, when I was about to compile the program I had written using the Qt library, I found that it could not be compiled with QMake due to a missing connection in Qml. After consulting with the maintenance personnel, I learned that it was an internal issue that had not yet been resolved, and I was advised to use CMake for compilation. Reluctantly, I modified the project from a pro file to a CMake project, and it compiled successfully without any issues.
After using it for a few days, I discovered that the compilation time for the Qt CMake project supported by QtCreator was about 30% to 50% longer than that of QMake. QtCreator frequently lagged, and after frequently reading files and modifying Qml files, the compilation and runtime took even longer. I initially thought it might be a problem with QtCreator, so I tried compiling via the command line, but the compilation was still slow.
Later, I found that before compiling Qml, Qt CMake copies Qml, type files, and dependency files to the build directory, which significantly reduces the compilation speed.
Currently, it seems that Qt CMake is not very mature, at least its optimization is not very good. I recall that during the Qt 6.0 update, not all modules from Qt 5.15 were ported over; it was a partial migration, and even in Qt 6.4, the migration was not fully completed, such as the Location module. There are screenshots and access links at the end of the article to confirm this.
Building Qt source code with QMake is indeed very difficult to extend, but switching to CMake does make the build process easier. If the only reason for switching from QMake to CMake is to facilitate building Qt source code, then it is unnecessary to make that switch. If engineers who have not worked with CMake switch hastily, it will only increase development costs.
This is not to say that CMake is bad; I often prefer CMake to manage cross-platform pure C projects, and it works great. The issue here is specifically with Qt CMake, which manages a bunch of moc, uic, and qml code generation tools, and it seems that the optimization is not very good.
In conclusion, I suggest waiting for further updates from Qt. It would be better to switch to CMake for project management only after the final version of Qt 6.x or above Qt 7.0.
Details: https://www.qt.io/blog/qt-6.4-released
