What is the preferred way to perform PrintScreen with Qt ?
-
If you just need to print a widget, you can use "QWidget::render()":http://doc.qt.io/qt-5/qwidget.html#render together with "QPrinter":http://doc.qt.io/qt-5/qprinter.html.
For screen shots of the whole screen, you need to use native APIs.
-
If it is a window from your app (Qt-based), and it inherits from QWidget, then my previous posts answers it. And if you mean a screen shot of any window - again, this is OS-specific. Not even OS, it depends on the windowing system.