Taking a complete screenshot in Qt. How?
-
I am trying to take a screenshot in Qt. I used the sample screenshot program that is included. (It is here: https://doc.qt.io/qt-6/qtwidgets-desktop-screenshot-example.html, code is here: https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/desktop/screenshot?h=6.7)
But it is only taking a screenshot of the Qt app along with the desktop background. It is not taking a screenshot of what is actually on screen. How do I remedy this?
I tried to do this as well using the native Mac OS API, and that had the same result.
I set the permissions properly, I believe, to permit these programs to screen record in Mac OS system preferences.
Any help is appreciated. Thank you.
-
I think it's a permissions issue because when I run the executable directly from the terminal then the screenshots function as they should. Otherwise if I call " open screenshot.app " it asks for permission and even after I give it screen capture permission it only screen captures the current screen