1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/examples/qqthttpdownload/qqthttpdownloadmanager.cpp
2017-11-23 19:12:48 +08:00

20 lines
613 B
C++

#include "qqthttpdownloadmanager.h"
QQtHttpDownloadManager::QQtHttpDownloadManager ( QObject* parent ) : QQtWebAccessManager ( parent )
{
QFile file ( "/Users/abel/Develop/c2-test/aa" );
file.open ( QFile::Truncate | QFile::WriteOnly );
file.close();
}
void QQtHttpDownloadManager::replyReadyRead ( QQtWebAccessSession* session )
{
pline() << session->getWebAccessReply()->url();
QByteArray data = session->getWebAccessReply()->readAll();
pline() << data;
QFile file ( "/Users/abel/Develop/c2-test/aa" );
file.open ( QFile::Append );
file.write ( data );
file.close();
}