qint64 get_size()
{
QString link = url->text();
std::cout<<qPrintable(link)<<std::endl;
QNetworkAccessManager manager;
QEventLoop loop;
QNetworkReply *reply = manager.head(QNetworkRequest(link));
QObject::connect(reply,SIGNAL(finished()), &loop, SLOT(quit()), Qt::DirectConnection);
loop.exec();
QVariant var = reply->header(QNetworkRequest::ContentLengthHeader);
delete reply;
qint64 size = var.toLongLong();
std::cout<<size<<std::endl;
return size;
}