- Extending Qt Creator Manual
- QtTaskTree
- ElseIf
- Extending Qt Creator Manual 20.0.0-beta1

# QtTaskTree::ElseIf Class

class QtTaskTree::ElseIf

An "else if" 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: | 6.11

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Public Functions

| ElseIf(Handler &&handler)

## Detailed Description

An alternative condition element of the conditional expressions. Must always be preceeded and followed by Then element.

See also If, Then, and Else.

## Member Function Documentation

### `[explicit]` template <typename Handler, int = true> ElseIf::ElseIf(Handler &&handler)

A helper constructor accepting the synchronous handler to be executed when evaluating the initial condition by the running QTaskTree.

It's a shortcut for:

     ElseIf (QSyncTask(handler))

See QSyncTask for more information on what handler types are acceptable.

See also QSyncTask and If.