gxh973121

博客园 首页 新随笔 联系 订阅 管理
#include<QtCore/QString>
#include<QtGui>
#include<QtGui/QPixmap>
int main(int argc,char* argv[]){
    QApplication app(argc,argv);
    QPixmap pixmap;
    pixmap=pixmap.grabWindow(QApplication::desktop()->winId());
    QString pic;
    pic="aa.jpg";
    pixmap.save(pic, "JPG");
    return app.exec(); 
}
posted on 2012-10-09 10:04  gxh973121  阅读(251)  评论(0)    收藏  举报