gpgme and the C++, Qt 5 and Python bindings can be configured, built and installed with the following commands:
./autogen-all.sh # runs autogen.sh for gpgme, lang/cpp, lang/qt and lang/python mkdir build cd build ../configure --prefix=/opt/gnupg/2.4 --enable-maintainer-mode --enable-languages="cpp qt python" --enable-qt-version=5 make make check make install
i.e. the only difference is that one needs to run ./autogen-all.sh instead of ./autogen.sh. And that one needs to enable the bindings and specify the Qt version. (By default, the Qt 6 are built if Qt 6 is found.)