Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "example.h"
- #include <QDebug>
- #include <QtConcurrent/QtConcurrentRun>
- #include <QFuture>
- #include <QUrl>
- Example::Example(QObject *parent) : QObject(parent)
- {
- QUrl url("http://test.com/index.html");
- auto future = QtConcurrent::run(this, &Example::download, url);
- }
- QByteArray Example::download(const QUrl &url)
- {
- qDebug() << __FUNCTION__ << thread();
- return QByteArray();
- }
Add Comment
Please, Sign In to add comment