QT每日下载沪深A股日线数据
废话不多说,先上代码。
.pro
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = get_hs_a_name_list
TEMPLATE = app
SOURCES += main.cpp\
namelistcatch.cpp
HEADERS += namelistcatch.h
FORMS += namelistcatch.ui
NameListCatch.h
#ifndef NAMELISTCATCH_H
#define NAMELISTCATCH_H
#include <QMainWindow>
#include <QDebug>
#include <QTimer>
#include <QDateTime>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QFile>
namespace Ui {
class NameListCatch;
}
class NameListCatch : public QMainWindow
{
Q_OBJECT
public:
explicit NameListCatch(QWidget *parent = 0);
~NameListCatch();
void StockListCatch();
public:
QTimer *mytimer;
QNetworkAccessManager *NetAccessManager;
unsigned short file_recv_flag;
QString current_date;