En esta página

QFlag Class

La clase QFlag es un tipo de datos auxiliar para QFlags. Más información...

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

Funciones públicas

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

Descripción detallada

Es equivalente a una clase « int » sin modificaciones, salvo en lo que respecta a la sobrecarga de funciones y las conversiones de tipos. No deberías necesitar utilizar nunca esta clase en tus aplicaciones.

Véase también ` QFlags`.

Documentación de las funciones de miembro

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

Crea un objeto QFlag que almacena la variable value.

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

Crea un objeto QFlag que almacena el value.

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

Crea un objeto QFlag que almacena el ` value`.

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

Crea un objeto QFlag que almacena el ` value`.

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

Devuelve el valor almacenado por el objeto ` QFlag `.

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

Devuelve el valor almacenado por el objeto ` QFlag `.

© 2026 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.