⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpget.h

📁 Qt4 程序集合
💻 H
字号:
#ifndef HTTPGET_H
#define HTTPGET_H

#include <QObject>
#include <QtNetwork>
class QFile;
class HttpGet : public QObject
{
	Q_OBJECT

public:
    HttpGet(QObject *parent =0);
    ~HttpGet();
    bool downloadFile(QUrl);
signals:
	void done();
private slots:
    void httpRequestFinished(int requestId, bool error);
	void readResponseHeader(const QHttpResponseHeader &responseHeader);
	void updateDataReadProgress(int bytesRead, int totalBytes);
	void httpDone(bool error);
private:
	QHttp *http;
	QFile *file;
	int httpGetId;
	bool httpRequestAborted;
	QString fileName;
};

#endif // HTTPGET_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -