QRangeModel::RowOptions Struct

template <typename T> struct QRangeModel::RowOptions

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

This struct was introduced in Qt 6.10.

Detailed Description

RowOptions<T> is a struct template where T specifies the row type. Specialize this template for the type used in your range, and add the relevant members.

MemberDocumentation
static constexpr RowCategory rowCategoryRowCategory
static QVariant headerData(int section, int role)Header data with role for the section of the horizontal header.
 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;
 };