I'm guessing qt5-5.12.8 is not recent enough to deal with the changes in Postgres 11+. You might want to ask this on the Qt list(s). I have tried to determine this, but the Qt repo structure is lets say interesting and I can't find any relevant information.
The version 12 compatibility commit was done in 5.15 only (5.12 works up to v11).
David J.