QtTaskTree::Then Class | Qt TaskTree | Qt 6.11.1
Description: A "then" element used in conditional expressions.

- Qt 6.11
- Qt TaskTree
- C++ Classes
- Then
- Qt 6.11.1 Reference Documentation

# QtTaskTree::Then Class

class QtTaskTree::Then

A "then" element used in conditional expressions. More...

Header: | `#include <qconditional.h>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS TaskTree)` `target_link_libraries(mytarget PRIVATE Qt6::TaskTree)`
qmake: | `QT += tasktree`
Since: | Qt 6.11

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Public Functions

| Then(const QtTaskTree::GroupItems &children)
| Then(std::initializer_list<QtTaskTree::GroupItem> children)

## Detailed Description

A branch body element of the conditional expressions. Must always be preceeded by If or ElseIf element. May be followed by Else or ElseIf element.

See also If, Else, and ElseIf.

## Member Function Documentation

### `[explicit]` Then::Then(const QtTaskTree::GroupItems &children)

Creates a branch body element with children items, to be used in conditional expression. If the preceeding If or ElseIf element finishes with success, the running QTaskTree executes the children, and the result of this execution is the final result of the whole conditional expression.

### `[explicit]` Then::Then(std::initializer_list<QtTaskTree::GroupItem> children)

Constructs a branch body element from `std::initializer_list` given by children.

This is an overloaded function.