- Qt 6.11
- Qt Core
- C++ Classes
- RowReferenceBase
- Qt 6.11.2 Reference Documentation

# QRangeModelAdapter::RowReferenceBase Struct

template <typename Reference, typename Adapter> struct QRangeModelAdapter::RowReferenceBase

RowReferenceBase provides common API for RowReference and ConstRowReference. More...

This struct is under development and is subject to change.

This struct was introduced in Qt 6.11.

- List of all members, including inherited members

## Public Functions

auto | at(int column) const
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | begin() const
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | cbegin() const
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | cend() const
auto | children() const
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | end() const
bool | hasChildren() const
QRangeModelAdapter<Range, Protocol, Model>::RowReferenceBase<Reference, Adapter>::size_type | size() const
auto | operator[](int column) const

## Detailed Description

For models that are tables or trees, accessing a row of an adapter using at(), subscript operator[], or dereferencing a RowIterator, returns a RowReference or ConstRowReference to the specified row.

See also DataReference.

## Member Function Documentation

### auto RowReferenceBase::at(int column) const

### auto RowReferenceBase::operator[](int column) const

Returns a reference wrapper to the item at column of this row.

Depending on the data structure the adapter operates on, the returned value is a const reference wrapper, a pointer to a const object, or a QVariant.

### QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::begin() const

Returns a ConstColumnIterator pointing to the first column of this row.

### QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::cbegin() const

Returns a ConstColumnIterator pointing to the first column of this row.

### QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::cend() const

Returns a ConstColumnIterator pointing just after the last column of this row.

### template <typename I, QRangeModelAdapter<Range, Protocol, Model>::if_tree<I> = true> auto RowReferenceBase::children() const

Returns a QRangeModelAdapter operating on the same range and model as this adapter, and with this row as the root index.

#### Constraints

Participates in overload resolution only if `Range` is a tree.

### QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::end() const

Returns a ConstColumnIterator pointing just after the last column of this row.

### template <typename I, QRangeModelAdapter<Range, Protocol, Model>::if_tree<I> = true> bool RowReferenceBase::hasChildren() const

Returns true if the referenced row has one or more child rows, otherwise false.

#### Constraints

Participates in overload resolution only if `Range` is a tree.

### QRangeModelAdapter<Range, Protocol, Model>::RowReferenceBase<Reference, Adapter>::size_type RowReferenceBase::size() const

Returns the number of columns in the model.

This returns the same value for all rows in the model.