Its very easy to take screenshot using Qt, as shwon in an official example.
https://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
I am interested in creating screen recorder but I could not find a Qt way for doing this.
How can I screen record using Qt?
assuming you mean screen cast without sound, then you could take a screen capture at a rate of 30 pictures per seconds then put that in a vector, create a video of that and use a good encoder so you dont waste to much memory
mp4 uses H.264/x264 and works very good but you can use whatever you want...