Frankly speaking, compiling all the prerequisites from scratch requires several external dependencies and it is tedious. IMHO you should instead focus on SALOME modules only.
Nevertheless, if you want to compile Qt, you can have a look at the corresponding script in SAT_SALOME\products\compil_scripts\qt-5.12.10.bat. Note that all patches to be applied to sources are also implemented in SAT_SALOME.
I guess some modules in Python were not installed, and the error disappeared after I installed PyQt5-5.15.3. I feel like there may be some errors in the sat_salome script, or maybe I didn’t install this module myself but sat_salome script actually set it up.