January 2020
Intermediate to advanced
426 pages
9h 39m
English
Now that we know how parsing works in XML, we can see what the implementation of the core of WorkerThread looks like, as follows:
WorkerThread::WorkerThread(QObject* owner){ this->setParent(owner); mNetManager = new QNetworkAccessManager(this); connect(mNetManager, &QNetworkAccessManager::finished, this, &WorkerThread::handleNetFinished);}void WorkerThread::run()
{
QXmlStreamReader xml;
QXmlStreamReader::TokenType type;
QString fieldName;
QString value;
QString tag;
bool successful = false;
bool gotValue = false;
QMap<QString, QString> result;
xml.setDevice(mReply);
Read now
Unlock full access