QPixmap fullScreenPixmap;
QDateTime dt = QDateTime::currentDateTime();
QString filename = dt.toString("/opt/yyyyMMddhhmmss") + ".png";
fullScreenPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
fullScreenPixmap.save(filename);
Qt截取屏幕
于 2021-06-18 11:50:40 首次发布