// 界面截图
void GMainWindow::widgetScreenshot()
{
QString filePathName = "Screen-.png";
QPixmap pixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
//filePathName += QDateTime::currentDateTime().toString("yyyy-MM-dd hh-mm-ss");
//filePathName += ".png";
if(!pixmap.save(filePathName))
{
printf("[%s,%d]\n", __FUNCTION__, __LINE__);
}
}
QT 4截图
猜你喜欢
转载自blog.csdn.net/huabiaochen/article/details/123471584
今日推荐
周排行