QScreen *screen = QGuiApplication::primaryScreen();
QPixmap screenShot = screen->grabWindow(0);
if(screenShot.save(QDir::currentPath() + "screen_shot_main_window.jpg")) { printf("截取了主屏幕");}
QScreen *screen = QGuiApplication::primaryScreen();
QPixmap screenShot = screen->grabWindow(0);
if(screenShot.save(QDir::currentPath() + "screen_shot_main_window.jpg")) { printf("截取了主屏幕");}