Rotating the Mark II touchscreen display

Raspberry PI OS does not provide QT packages, its their distribution issue feel free to go open a bug report there if you want to build on it. Alternatively can use a different distribution which provides Qt5 packages out of the box for the raspberry pi 4 like Ubuntu 20.04+ (any latest version) or Manjaro.

Alternatively you can look at the OpenVoiceOS project which is still under development that is building images for the RPI4 OpenVoiceOS - A bare minimal (production type of) OS based on Buildroot - #334 by j1nx , development images are posted on its matrix channel and it does also support rotation directly from the drop down menu.