QT QMainWindow 截屏

2022-11-09  本文已影响0人  blue_lights

QScreen *screen = QGuiApplication::primaryScreen();

QPixmap screenShot = screen->grabWindow(0);

if(screenShot.save(QDir::currentPath() + "screen_shot_main_window.jpg")) { printf("截取了主屏幕");}

上一篇 下一篇

猜你喜欢

热点阅读