Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRangeModel::ItemAccess< T > Class Template Reference

\inmodule QtCore More...

#include <qrangemodel.h>

Inheritance diagram for QRangeModel::ItemAccess< T >:
Collaboration diagram for QRangeModel::ItemAccess< T >:

Detailed Description

template<typename T>
class QRangeModel::ItemAccess< T >

\inmodule QtCore

The ItemAccess template provides a customization point to control how QRangeModel accesses role data of individual items.

Since
6.11

Specialize this template for the type used in your data structure, and implement {readRole()} and {writeRole()} members to access the role- specific data of your type.

template <>
struct QRangeModel::ItemAccess<ItemType>
{
static QVariant readRole(const ItemType &item, int role)
{
switch (role) {
// ...
}
return {};
}
static bool writeRole(ItemType &item, const QVariant &data, int role)
{
bool ok = false;
switch (role) {
// ...
}
return ok;
}
};
\inmodule QtCore
Definition qvariant.h:66
static bool ok(QGradientStop stop)
Definition qbrush.cpp:1681
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
[0]
QGraphicsItem * item
\inmodule QtCore
Definition qrangemodel.h:30

A specialization of this type will take precedence over any predefined behavior. Do not specialize this template for types you do not own.

Definition at line 30 of file qrangemodel.h.


The documentation for this class was generated from the following file: