This is a C++ conversion of the Qt3D QML Shadow Map example. This is not a strict port, since I just wanted the shadow mapping for another project I'm working on, so the fancy airplane animation is not included. I tried to build the classes so that they mirror the QML in terms of interface and functionality. It took me weeks to work this out, so I'm posting the code to help others. It's a shame that Qt3D is so lacking in documentation and example code.
Tested against Qt 5.12.3 and Qt 5.15.5