このページでは

QFlag Class

QFlag クラスは、QFlags の補助データ型です。詳細...

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

パブリック関数

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

詳細な説明

関数のオーバーロードおよび型変換に関する点を除き、通常のint と同等です。アプリケーション内でこのクラスを使用する必要は一切ありません。

QFlagsも参照してください 。

メンバ関数のドキュメント

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

value を格納するQFlagオブジェクトを作成します。

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

value を格納するQFlagオブジェクトを生成します。

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

value を格納するQFlagオブジェクトを生成します。

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

value を格納するQFlagオブジェクトを生成します。

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

QFlag オブジェクトに格納されている値を返します。

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

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.