QFlag Class | Qt Core | Qt 6.11.0
Description: The QFlag class is a helper data type for QFlags.

- Qt 6.11
- Qt Core
- C++ Classes
- QFlag
- Qt 6.11.0 Reference Documentation

# QFlag Class

The QFlag class is a helper data type for QFlags. More...

Header: | `#include <QFlag>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Core)` `target_link_libraries(mytarget PRIVATE Qt6::Core)`
qmake: | `QT += core`

- List of all members, including inherited members

## Public Functions

| QFlag(int value)
| QFlag(short value)
| QFlag(uint value)
| QFlag(ushort value)
| operator int() const
| operator uint() const

## Detailed Description

It is equivalent to a plain `int`, except with respect to function overloading and type conversions. You should never need to use this class in your applications.

See also QFlags.

## Member Function Documentation

### `[constexpr noexcept]` QFlag::QFlag(int value)

Constructs a QFlag object that stores the value.

### `[constexpr noexcept]` QFlag::QFlag(short value)

Constructs a QFlag object that stores the value.

### `[constexpr noexcept]` QFlag::QFlag(uint value)

Constructs a QFlag object that stores the value.

### `[constexpr noexcept]` QFlag::QFlag(ushort value)

Constructs a QFlag object that stores the value.

### `[constexpr noexcept]` QFlag::operator int() const

Returns the value stored by the QFlag object.

### `[constexpr noexcept]` QFlag::operator uint() const

Returns the value stored by the QFlag object.