1 | /* -*- C++ -*- |
---|---|
2 | This file is part of ThreadWeaver. |
3 | |
4 | SPDX-FileCopyrightText: 2005-2014 Mirko Boehm <mirko@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | //@@snippet_begin(sample-helloworld) |
10 | #include <ThreadWeaver/ThreadWeaver> |
11 | |
12 | #include <QCoreApplication> |
13 | |
14 | int main(int argc, char **argv) |
15 | { |
16 | QCoreApplication app(argc, argv); |
17 | |
18 | using namespace ThreadWeaver; |
19 | stream() << make_job(t: []() { |
20 | qDebug() << "Hello World!"; |
21 | }); |
22 | } |
23 | //@@snippet_end |
24 |