6#ifndef QABSTRACTITEMMODEL_H
7#define QABSTRACTITEMMODEL_H
9#include <QtCore/qcompare.h>
10#include <QtCore/qhash.h>
11#include <QtCore/qlist.h>
12#include <QtCore/qobject.h>
13#include <QtCore/qvariant.h>
31 constexpr int role()
const noexcept {
return m_role; }
37 { m_data.setValue(std::forward<T>(value)); }
47template <
typename T,
typename Enable =
void>
81 : m_modelRoleData(&modelRoleData),
86 : m_modelRoleData(modelRoleData),
90 template <
typename Container, if_compatible_container<Container> =
true>
105#ifdef __cpp_lib_constexpr_algorithms
106 auto result = std::find_if(begin(), end(), [role](
const QModelRoleData &roleData) {
107 return roleData.role() == role;
111 const auto e = end();
112 for (; result != e; ++result) {
118 return Q_ASSERT(result != end()), &result->data();
124class QAbstractItemModel;
125class QPersistentModelIndex;
129 friend class QAbstractItemModel;
133 constexpr inline int row()
const noexcept {
return r; }
134 constexpr inline int column()
const noexcept {
return c; }
145 constexpr inline const QAbstractItemModel *
model()
const noexcept {
return m.get(); }
146 constexpr inline bool isValid()
const noexcept {
return (r >= 0) && (c >= 0) && (m !=
nullptr); }
151 return lhs.r == rhs.r && lhs.c == rhs.c && lhs.i == rhs.i && lhs.m == rhs.m;
155 if (
auto val = Qt::compareThreeWay(lhs.r, rhs.r); !is_eq(val))
157 if (
auto val = Qt::compareThreeWay(lhs.c, rhs.c); !is_eq(val))
159 if (
auto val = Qt::compareThreeWay(lhs.i, rhs.i); !is_eq(val))
161 if (
auto val = Qt::compareThreeWay(lhs.m, rhs.m); !is_eq(val))
163 return Qt::strong_ordering::equivalent;
173 Qt::totally_ordered_wrapper<
const QAbstractItemModel *> m;
177#ifndef QT_NO_DEBUG_STREAM
184size_t qHash(
const QPersistentModelIndex &index, size_t seed = 0)
noexcept;
189 QPersistentModelIndex();
190 QPersistentModelIndex(
const QModelIndex &index);
191 QPersistentModelIndex(
const QPersistentModelIndex &other);
192 ~QPersistentModelIndex();
193#if QT_CORE_REMOVED_SINCE(6
, 8
)
194 bool operator<(
const QPersistentModelIndex &other)
const noexcept;
195 bool operator==(
const QPersistentModelIndex &other)
const noexcept;
196 inline bool operator!=(
const QPersistentModelIndex &other)
const noexcept
197 {
return !operator==(other); }
199 QPersistentModelIndex &operator=(
const QPersistentModelIndex &other);
200 inline QPersistentModelIndex(QPersistentModelIndex &&other)
noexcept
201 : d(std::exchange(other.d,
nullptr)) {}
202 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QPersistentModelIndex)
203 void swap(QPersistentModelIndex &other)
noexcept { qt_ptr_swap(d, other.d); }
204#if QT_CORE_REMOVED_SINCE(6
, 8
)
205 bool operator==(
const QModelIndex &other)
const noexcept;
206 bool operator!=(
const QModelIndex &other)
const noexcept;
208 QPersistentModelIndex &operator=(
const QModelIndex &other);
209 operator QModelIndex()
const;
212 void *internalPointer()
const;
213 const void *constInternalPointer()
const;
214 quintptr internalId()
const;
215 QModelIndex parent()
const;
216 QModelIndex sibling(
int row,
int column)
const;
217 QVariant data(
int role = Qt::DisplayRole)
const;
218 void multiData(QModelRoleDataSpan roleDataSpan)
const;
219 Qt::ItemFlags flags()
const;
220 const QAbstractItemModel *model()
const;
221 bool isValid()
const;
223 QPersistentModelIndexData *d;
224 friend size_t qHash(
const QPersistentModelIndex &, size_t seed)
noexcept;
225 friend bool qHashEquals(
const QPersistentModelIndex &a,
const QPersistentModelIndex &b)
noexcept
226 {
return a.d == b.d; }
227 friend Q_CORE_EXPORT
bool
228 comparesEqual(
const QPersistentModelIndex &lhs,
const QPersistentModelIndex &rhs)
noexcept;
229 friend Q_CORE_EXPORT
bool
230 comparesEqual(
const QPersistentModelIndex &lhs,
const QModelIndex &rhs)
noexcept;
231 friend Q_CORE_EXPORT Qt::strong_ordering
232 compareThreeWay(
const QPersistentModelIndex &lhs,
const QPersistentModelIndex &rhs)
noexcept;
233 friend Q_CORE_EXPORT Qt::strong_ordering
234 compareThreeWay(
const QPersistentModelIndex &lhs,
const QModelIndex &rhs)
noexcept;
235#if !QT_CORE_REMOVED_SINCE(6
, 8
)
236 Q_DECLARE_STRONGLY_ORDERED(QPersistentModelIndex)
237 Q_DECLARE_STRONGLY_ORDERED(QPersistentModelIndex, QModelIndex)
239#ifndef QT_NO_DEBUG_STREAM
240 friend Q_CORE_EXPORT QDebug operator<<(QDebug,
const QPersistentModelIndex &);
245inline size_t qHash(
const QPersistentModelIndex &index, size_t seed)
noexcept
246{
return qHash(index.d, seed); }
249#ifndef QT_NO_DEBUG_STREAM
250Q_CORE_EXPORT
QDebug operator<<(QDebug,
const QPersistentModelIndex &);
256class QAbstractItemModelPrivate;
257class QTransposeProxyModelPrivate;
258template <
class Key,
class T>
class QMap;
265 friend class QPersistentModelIndexData;
266 friend class QAbstractItemViewPrivate;
267 friend class QAbstractProxyModel;
270 explicit QAbstractItemModel(QObject *parent =
nullptr);
271 virtual ~QAbstractItemModel();
273 Q_INVOKABLE
bool hasIndex(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
274 Q_INVOKABLE
virtual QModelIndex index(
int row,
int column,
275 const QModelIndex &parent = QModelIndex())
const = 0;
276 Q_INVOKABLE
virtual QModelIndex parent(
const QModelIndex &child)
const = 0;
278 Q_INVOKABLE
virtual QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const;
279 Q_INVOKABLE
virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const = 0;
280 Q_INVOKABLE
virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const = 0;
281 Q_INVOKABLE
virtual bool hasChildren(
const QModelIndex &parent = QModelIndex())
const;
283 Q_INVOKABLE
virtual QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const = 0;
284 Q_INVOKABLE
virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
286 Q_INVOKABLE
virtual QVariant headerData(
int section, Qt::Orientation orientation,
287 int role = Qt::DisplayRole)
const;
288 virtual bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &value,
289 int role = Qt::EditRole);
291 virtual QMap<
int, QVariant> itemData(
const QModelIndex &index)
const;
292 virtual bool setItemData(
const QModelIndex &index,
const QMap<
int, QVariant> &roles);
293 virtual bool clearItemData(
const QModelIndex &index);
295 virtual QStringList mimeTypes()
const;
296 virtual QMimeData *mimeData(
const QModelIndexList &indexes)
const;
297 virtual bool canDropMimeData(
const QMimeData *data, Qt::DropAction action,
298 int row,
int column,
const QModelIndex &parent)
const;
299 virtual bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
300 int row,
int column,
const QModelIndex &parent);
301 virtual Qt::DropActions supportedDropActions()
const;
302 virtual Qt::DropActions supportedDragActions()
const;
304 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
305 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool insertColumns(
int column,
int count,
const QModelIndex &parent = QModelIndex());
306 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
307 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool removeColumns(
int column,
int count,
const QModelIndex &parent = QModelIndex());
308 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool moveRows(
const QModelIndex &sourceParent,
int sourceRow,
int count,
309 const QModelIndex &destinationParent,
int destinationChild);
310 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool moveColumns(
const QModelIndex &sourceParent,
int sourceColumn,
int count,
311 const QModelIndex &destinationParent,
int destinationChild);
313 Q_INVOKABLE Q_REVISION(6, 4)
inline bool insertRow(
int row,
const QModelIndex &parent = QModelIndex());
314 Q_INVOKABLE Q_REVISION(6, 4)
inline bool insertColumn(
int column,
const QModelIndex &parent = QModelIndex());
315 Q_INVOKABLE Q_REVISION(6, 4)
inline bool removeRow(
int row,
const QModelIndex &parent = QModelIndex());
316 Q_INVOKABLE Q_REVISION(6, 4)
inline bool removeColumn(
int column,
const QModelIndex &parent = QModelIndex());
317 Q_INVOKABLE Q_REVISION(6, 4)
inline bool moveRow(
const QModelIndex &sourceParent,
int sourceRow,
318 const QModelIndex &destinationParent,
int destinationChild);
319 Q_INVOKABLE Q_REVISION(6, 4)
inline bool moveColumn(
const QModelIndex &sourceParent,
int sourceColumn,
320 const QModelIndex &destinationParent,
int destinationChild);
322 Q_INVOKABLE
virtual void fetchMore(
const QModelIndex &parent);
323 Q_INVOKABLE
virtual bool canFetchMore(
const QModelIndex &parent)
const;
324 Q_INVOKABLE
virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
325 Q_INVOKABLE Q_REVISION(6, 4)
virtual void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder);
326 virtual QModelIndex buddy(
const QModelIndex &index)
const;
327 Q_INVOKABLE
virtual QModelIndexList match(
const QModelIndex &start,
int role,
328 const QVariant &value,
int hits = 1,
329 Qt::MatchFlags flags =
330 Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap))
const;
331 virtual QSize span(
const QModelIndex &index)
const;
333 virtual QHash<
int,QByteArray> roleNames()
const;
335 using QObject::parent;
337 enum LayoutChangeHint
343 Q_ENUM(LayoutChangeHint)
345 enum class CheckIndexOption {
347 IndexIsValid = 0x0001,
348 DoNotUseParent = 0x0002,
349 ParentIsInvalid = 0x0004,
351 Q_ENUM(CheckIndexOption)
352 Q_DECLARE_FLAGS(CheckIndexOptions, CheckIndexOption)
354 [[nodiscard]]
bool checkIndex(
const QModelIndex &index, CheckIndexOptions options = CheckIndexOption::NoOption)
const;
356 virtual void multiData(
const QModelIndex &index, QModelRoleDataSpan roleDataSpan)
const;
359 void dataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
360 const QList<
int> &roles = QList<
int>());
361 void headerDataChanged(Qt::Orientation orientation,
int first,
int last);
362 void layoutChanged(
const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
363 void layoutAboutToBeChanged(
const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
365 void rowsAboutToBeInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
366 void rowsInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
368 void rowsAboutToBeRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
369 void rowsRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
371 void columnsAboutToBeInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
372 void columnsInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
374 void columnsAboutToBeRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
375 void columnsRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
377 void modelAboutToBeReset(QPrivateSignal);
378 void modelReset(QPrivateSignal);
380 void rowsAboutToBeMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationRow, QPrivateSignal);
381 void rowsMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationRow, QPrivateSignal);
383 void columnsAboutToBeMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationColumn, QPrivateSignal);
384 void columnsMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationColumn, QPrivateSignal);
387 virtual bool submit();
388 virtual void revert();
391 virtual void resetInternalData();
394 QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent =
nullptr);
396 inline QModelIndex createIndex(
int row,
int column,
const void *data =
nullptr)
const;
397 inline QModelIndex createIndex(
int row,
int column, quintptr id)
const;
399 void encodeData(
const QModelIndexList &indexes, QDataStream &stream)
const;
400 bool decodeData(
int row,
int column,
const QModelIndex &parent, QDataStream &stream);
402 void beginInsertRows(
const QModelIndex &parent,
int first,
int last);
403 void endInsertRows();
405 void beginRemoveRows(
const QModelIndex &parent,
int first,
int last);
406 void endRemoveRows();
408 bool beginMoveRows(
const QModelIndex &sourceParent,
int sourceFirst,
int sourceLast,
const QModelIndex &destinationParent,
int destinationRow);
411 void beginInsertColumns(
const QModelIndex &parent,
int first,
int last);
412 void endInsertColumns();
414 void beginRemoveColumns(
const QModelIndex &parent,
int first,
int last);
415 void endRemoveColumns();
417 bool beginMoveColumns(
const QModelIndex &sourceParent,
int sourceFirst,
int sourceLast,
const QModelIndex &destinationParent,
int destinationColumn);
418 void endMoveColumns();
420 void beginResetModel();
421 void endResetModel();
423 void changePersistentIndex(
const QModelIndex &from,
const QModelIndex &to);
424 void changePersistentIndexList(
const QModelIndexList &from,
const QModelIndexList &to);
425 QModelIndexList persistentIndexList()
const;
427 static Qt::weak_ordering compareData(
const QVariant &lhs,
const QVariant &rhs,
428 const QCollator *collator =
nullptr);
431 Q_DECLARE_PRIVATE(QAbstractItemModel)
432 Q_DISABLE_COPY(QAbstractItemModel)
435Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractItemModel::CheckIndexOptions)
437inline bool QAbstractItemModel::insertRow(
int arow,
const QModelIndex &aparent)
438{
return insertRows(arow, 1, aparent); }
439inline bool QAbstractItemModel::insertColumn(
int acolumn,
const QModelIndex &aparent)
440{
return insertColumns(acolumn, 1, aparent); }
441inline bool QAbstractItemModel::removeRow(
int arow,
const QModelIndex &aparent)
442{
return removeRows(arow, 1, aparent); }
443inline bool QAbstractItemModel::removeColumn(
int acolumn,
const QModelIndex &aparent)
444{
return removeColumns(acolumn, 1, aparent); }
445inline bool QAbstractItemModel::moveRow(
const QModelIndex &sourceParent,
int sourceRow,
446 const QModelIndex &destinationParent,
int destinationChild)
447{
return moveRows(sourceParent, sourceRow, 1, destinationParent, destinationChild); }
448inline bool QAbstractItemModel::moveColumn(
const QModelIndex &sourceParent,
int sourceColumn,
449 const QModelIndex &destinationParent,
int destinationChild)
450{
return moveColumns(sourceParent, sourceColumn, 1, destinationParent, destinationChild); }
451inline QModelIndex QAbstractItemModel::createIndex(
int arow,
int acolumn,
const void *adata)
const
452{
return QModelIndex(arow, acolumn, adata,
this); }
453inline QModelIndex QAbstractItemModel::createIndex(
int arow,
int acolumn, quintptr aid)
const
454{
return QModelIndex(arow, acolumn, aid,
this); }
461 explicit QAbstractTableModel(QObject *parent =
nullptr);
462 ~QAbstractTableModel();
464 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
465 QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const override;
466 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
467 int row,
int column,
const QModelIndex &parent) override;
469 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
471 using QObject::parent;
474 QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent);
477 Q_DECLARE_PRIVATE(QAbstractItemModel)
478 Q_DISABLE_COPY(QAbstractTableModel)
479 QModelIndex parent(
const QModelIndex &child)
const override;
480 bool hasChildren(
const QModelIndex &parent)
const override;
488 explicit QAbstractListModel(QObject *parent =
nullptr);
489 ~QAbstractListModel();
491 QModelIndex index(
int row,
int column = 0,
const QModelIndex &parent = QModelIndex())
const override;
492 QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const override;
493 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
494 int row,
int column,
const QModelIndex &parent) override;
496 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
498 using QObject::parent;
501 QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent);
504 Q_DECLARE_PRIVATE(QAbstractItemModel)
505 Q_DISABLE_COPY(QAbstractListModel)
506 QModelIndex parent(
const QModelIndex &child)
const override;
507 int columnCount(
const QModelIndex &parent)
const override;
508 bool hasChildren(
const QModelIndex &parent)
const override;
514{
return m ? m->parent(*
this) : QModelIndex(); }
517{
return m ? (r == arow && c == acolumn) ? *
this : m->sibling(arow, acolumn, *
this) : QModelIndex(); }
520{
return m ? (c == acolumn) ? *
this : m->sibling(r, acolumn, *
this) : QModelIndex(); }
523{
return m ? (r == arow) ? *
this : m->sibling(arow, c, *
this) : QModelIndex(); }
526{
return m ? m->data(*
this, arole) : QVariant(); }
529{
if (m) m->multiData(*
this, roleDataSpan); }
532{
return m ? m->flags(*
this) : Qt::ItemFlags(); }
536#if QT_VERSION >= QT_VERSION_CHECK(7
, 0
, 0
)
537 return qHashMulti(seed, index.row(), index.column(), index.internalId());
539 return size_t((size_t(index.row()) << 4) + size_t(index.column()) + index.internalId()) ^ seed;
545QT_DECL_METATYPE_EXTERN(QModelIndexList, Q_CORE_EXPORT)
QModelIndex siblingAtColumn(int column) const
Returns the sibling at column for the current row.
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index, or a default-constructed Q...
constexpr int row() const noexcept
Returns the row this model index refers to.
friend constexpr bool comparesEqual(const QModelIndex &lhs, const QModelIndex &rhs) noexcept
QModelIndex siblingAtRow(int row) const
Returns the sibling at row for the current column.
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
constexpr const QAbstractItemModel * model() const noexcept
Returns a pointer to the model containing the item that this index refers to.
Qt::ItemFlags flags() const
constexpr bool isValid() const noexcept
Returns {true} if this model index is valid; otherwise returns {false}.
void * internalPointer() const noexcept
Returns a {void} {*} pointer used by the model to associate the index with the internal data structur...
friend constexpr Qt::strong_ordering compareThreeWay(const QModelIndex &lhs, const QModelIndex &rhs) noexcept
void multiData(QModelRoleDataSpan roleDataSpan) const
constexpr QModelIndex() noexcept
Creates a new empty model index.
constexpr int column() const noexcept
Returns the column this model index refers to.
QModelIndex sibling(int row, int column) const
Returns the sibling at row and column.
constexpr quintptr internalId() const noexcept
Returns a {quintptr} used by the model to associate the index with the internal data structure.
const void * constInternalPointer() const noexcept
Returns a {const void} {*} pointer used by the model to associate the index with the internal data st...
constexpr qsizetype size() const noexcept
Returns the length of the span represented by this object.
constexpr QModelRoleData * end() const noexcept
Returns a pointer to the imaginary element one past the end of the span represented by this object.
constexpr QModelRoleData * begin() const noexcept
Returns a pointer to the beginning of the span represented by this object.
constexpr QModelRoleDataSpan() noexcept
Constructs an empty QModelRoleDataSpan.
constexpr qsizetype length() const noexcept
Returns the length of the span represented by this object.
constexpr QModelRoleDataSpan(Container &c) noexcept(noexcept(std::data(c)) &&noexcept(std::size(c)))
Constructs an QModelRoleDataSpan spanning over the container c, which can be any contiguous container...
constexpr QModelRoleData & operator[](qsizetype index) const
Returns a modifiable reference to the QModelRoleData at position index in the span.
constexpr QModelRoleData * data() const noexcept
Returns a pointer to the beginning of the span represented by this object.
constexpr QModelRoleDataSpan(QModelRoleData *modelRoleData, qsizetype len)
Constructs an QModelRoleDataSpan spanning over the array beginning at modelRoleData and with length l...
constexpr QModelRoleDataSpan(QModelRoleData &modelRoleData) noexcept
Constructs an QModelRoleDataSpan spanning over modelRoleData, seen as a 1-element array.
constexpr QVariant * dataForRole(int role) const
Returns the data associated with the first QModelRoleData in the span that has its role equal to role...
constexpr int role() const noexcept
Returns the role held by this object.
constexpr void setData(T &&value) noexcept(noexcept(m_data.setValue(std::forward< T >(value))))
Sets the data held by this object to value.
void clearData() noexcept
Clears the data held by this object.
constexpr QVariant & data() noexcept
Returns the data held by this object as a modifiable reference.
QModelRoleData(int role) noexcept
Constructs a QModelRoleData object for the given role.
constexpr const QVariant & data() const noexcept
Returns the data held by this object.
Combined button and popup list for selecting options.
bool comparesEqual(const QPersistentModelIndex &lhs, const QModelIndex &rhs) noexcept
Qt::strong_ordering compareThreeWay(const QPersistentModelIndex &lhs, const QPersistentModelIndex &rhs) noexcept
static uint typeOfVariant(const QVariant &value)
QDebug operator<<(QDebug dbg, const QModelIndex &idx)
Qt::strong_ordering compareThreeWay(const QPersistentModelIndex &lhs, const QModelIndex &rhs) noexcept
QDebug operator<<(QDebug dbg, const QPersistentModelIndex &idx)
bool comparesEqual(const QPersistentModelIndex &lhs, const QPersistentModelIndex &rhs) noexcept
Q_GLOBAL_STATIC(DefaultRoleNames, qDefaultRoleNames, { { Qt::DisplayRole, "display" }, { Qt::DecorationRole, "decoration" }, { Qt::EditRole, "edit" }, { Qt::ToolTipRole, "toolTip" }, { Qt::StatusTipRole, "statusTip" }, { Qt::WhatsThisRole, "whatsThis" }, }) const QHash< int
size_t qHash(const QModelIndex &index, size_t seed=0) noexcept
Q_DECLARE_TYPEINFO(QModelRoleDataSpan, Q_RELOCATABLE_TYPE)
QT_REQUIRE_CONFIG(itemmodel)
QList< QModelIndex > QModelIndexList
size_t qHash(const QPersistentModelIndex &index, size_t seed=0) noexcept
Q_DECLARE_TYPEINFO(QModelIndex, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QModelRoleData, Q_RELOCATABLE_TYPE)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)