QtTaskTree::ElseIf Class

class QtTaskTree::ElseIf

An "else if" element used in conditional expressions. More...

Header: #include <qconditional.h>

Note: All functions in this class are reentrant.

Public Functions

ElseIf(const QtTaskTree::ExecutableItem &condition)
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] ElseIf::ElseIf(const QtTaskTree::ExecutableItem &condition)

Creates an alternative condition element with condition task to be used in conditional expression.

See also If.

[explicit] template <typename Handler, std::enable_if_t<!std::is_base_of_v<ExecutableItem, std::decay_t<Handler>>, bool> = 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.

This is an overloaded function.

See also QSyncTask and If.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.