Qt加载网页图标

 

 

   QNetworkAccessManager *manager = new QNetworkAccessManager();
    QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url)));
    QByteArray responseData;
    QEventLoop eventLoop;

    QObject::connect(manager, SIGNAL(finished(QNetworkReply *)), &eventLoop, SLOT(quit()));

    eventLoop.exec();
    responseData = reply->readAll();

   QPixmap pix;
   pix.loadFromData(responseData);

   m_pPushButton->setIcon(QIcon(pix));

 

上一篇:基于Maxmspjitter的基础【pixel shader】绘制模板Patcher


下一篇:【表盘识别】基于matlab Hough变换指针式仪表识别(倾斜矫正)【含Matlab源码 1058期】