Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QApplication>
- #include <QDesktopWidget>
- #include <QPixmap>
- int main(int argc, char **argv) {
- QApplication app(argc, argv);
- for (int s = 0; s < QApplication::desktop()->screenCount(); ++s)
- QPixmap::grabWindow(QApplication::desktop()->screen(s)->winId()).save(QString("%0/desktop_%1.png").arg(QApplication::applicationDirPath()).arg(s));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement