File: index.md

package info (click to toggle)
qcoro 0.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,700 kB
  • sloc: cpp: 8,573; python: 32; xml: 26; makefile: 23; sh: 15
file content (37 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!--
SPDX-FileCopyrightText: 2022 Jonah BrĂ¼chert <jbb@kaidan.im>
SPDX-License-Identifier: GFDL-1.3-or-later
-->

# QML Module

The `QML` module contains coroutine-friendly wrappers for
[QtQml][qtdoc-qml] classes.

## CMake Usage

```cmake
find_package(QCoro6 COMPONENTS Qml)
...
target_link_libraries(my-target QCoro::Qml)
```

## QMake Usage

```
QT += QCoroQml
```

## Type registration

To use types defined in QCoroQml, you need to call the `QCoro::Qml::registerTypes` function before loading the QML.

```C++
int main() {
    ...
    QCoro::Qml::registerTypes();
    ...
}
```

[qtdoc-qml]: https://doc.qt.io/qt-5/qml-index.html