Guest User

Untitled

a guest
Oct 6th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include "example.h"
  2. #include <QDebug>
  3. #include <QtConcurrent/QtConcurrentRun>
  4. #include <QFuture>
  5. #include <QUrl>
  6.  
  7. Example::Example(QObject *parent) : QObject(parent)
  8. {
  9.     QUrl url("http://test.com/index.html");
  10.     auto future = QtConcurrent::run(this, &Example::download, url);
  11. }
  12.  
  13. QByteArray Example::download(const QUrl &url)
  14. {
  15.     qDebug() << __FUNCTION__ << thread();
  16.     return QByteArray();
  17. }
  18.  
Add Comment
Please, Sign In to add comment