My project do support both Qt5 and Qt6. The same QML code is used, except some files. Some qml files are added in resources when compiling using Qt5, and others - when compiling using Qt6.
Example of Qt6 qml file, which just exists on disk but on included into the resources when compiling using Qt5:
I calls deploy tools using --qml-dir parameter. These tools sees these Qt5Compat.GraphicalEffects import and thinks that this requires all Qt53D stuff. If I remove these Qt6 files from disk - all is compiled/deployed/run fine.
A temporary workaround is to remove these Qt6 qml files from disk before calling deploy tool. Also, under Windows OS I can use these parameters for windeployqt tool:
Unfortunately, it seems that these parameters are supported under Windows only.