QPixmap::grabWindow(QApplication::desktop()->winId()); QPixmap有一个grabWindow函数,即可 转载于:https://www.cnblogs.com/baizx/archive/2010/08/13/1799172.html