Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
src_corelib_thread_qfuturewatcher.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5// Instantiate the objects and connect to the finished signal.
8connect(&watcher, &QFutureWatcher<int>::finished, &myObject, &MyClass::handleFinished);
9
10// Start the computation.
12watcher.setFuture(future);
auto run(QThreadPool *pool, Function &&f, Args &&...args)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
QFutureWatcher< int > watcher
QFuture< int > future