This is another (however, not alternative; rather OS-specific) approach to bring Qt 6 to Bitcoin Core GUI users.
In Qt 6 most of the libraries are built as frameworks (by default), therefore, this PR is much less invasive and (I hope) less controversial then bitcoin/bitcoin#24798.
To test this PR on macOS (both Intel-based and Apple Silicon) just
0# brew remove qt@5
1# brew install qt
2# ./autogen.sh
3# ./configure --with-gui=qt6
4# make clean
5# make
6# make check
The other benefit of this PR is keeping our Qt code base compatible with Qt 6 due to the CI task which runs --with-gui=qt6
.
Documentation update and guarding calls which are deprecated in Qt 6 are left for follow ups to keep this PR focused on build stuff.
Based on multiple PRs in the GUI repo which get code base compatible with Qt 6, and only the last two commits belong to this PR.