16,240
社区成员
发帖
与我相关
我的任务
分享
webpage_resolution::webpage_resolution(QWidget *parent) :
QWidget(parent)
{
//get the html
manager = new QNetworkAccessManager(this);
QUrl url("http://www.boc.cn/sourcedb/whpj/enindex.html");
this->url = url;
connect(manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replay_finished(QNetworkReply*)));
manager->get(QNetworkRequest(this->url));
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(updatevalue()));
timer->start(1000);
}
void webpage_resolution::updatevalue()
{
QUrl ur;
ur = this->url;
if (ur.isEmpty())
qDebug() << "url is empty";
manager->get(QNetworkRequest(ur));
ur.clear();
}