QRangeModel::RowOptions Struct

模板 <typename T> 结构 QRangeModel ::RowOptions

The RowOptions template provides a customization point to control how QRangeModel represents types used as rows. 更多...

This struct was introduced in Qt 6.10.

详细描述

Specialize this template for the type used in your range, and add the relevant members.

成员
static constexpr RowCategory rowCategory RowCategory
class ColorEntry
{
    Q_GADGET
    Q_PROPERTY(QString display MEMBER m_colorName)
    Q_PROPERTY(QColor decoration READ decoration)
    Q_PROPERTY(QString toolTip READ toolTip)
public:
    ...
};
template <>
struct QRangeModel::RowOptions<ColorEntry>
{
    static constexpr auto rowCategory = QRangeModel::RowCategory::MultiRoleItem;
};