5#ifndef QABSTRACTITEMMODEL_H
6#define QABSTRACTITEMMODEL_H
8#include <QtCore/qcompare.h>
9#include <QtCore/qhash.h>
10#include <QtCore/qlist.h>
11#include <QtCore/qobject.h>
12#include <QtCore/qvariant.h>
24 explicit QModelRoleData(
int role)
noexcept
28 constexpr int role()
const noexcept {
return m_role; }
29 constexpr QVariant &data()
noexcept {
return m_data; }
30 constexpr const QVariant &data()
const noexcept {
return m_data; }
33 constexpr void setData(T &&value)
noexcept(
noexcept(m_data.setValue(std::forward<T>(value))))
34 { m_data.setValue(std::forward<T>(value)); }
36 void clearData()
noexcept { m_data.clear(); }
44template <
typename T,
typename Enable =
void>
68 QModelRoleData *m_modelRoleData =
nullptr;
78 : m_modelRoleData(&modelRoleData),
83 : m_modelRoleData(modelRoleData),
87 template <
typename Container, if_compatible_container<Container> =
true>
95 constexpr QModelRoleData *
data()
const noexcept {
return m_modelRoleData; }
96 constexpr QModelRoleData *
begin()
const noexcept {
return m_modelRoleData; }
97 constexpr QModelRoleData *
end()
const noexcept {
return m_modelRoleData + m_len; }
98 constexpr QModelRoleData &
operator[](qsizetype index)
const {
return m_modelRoleData[index]; }
102#ifdef __cpp_lib_constexpr_algorithms
103 auto result = std::find_if(begin(), end(), [role](
const QModelRoleData &roleData) {
104 return roleData.role() == role;
108 const auto e = end();
109 for (; result != e; ++result) {
110 if (result->role() == role)
115 return Q_ASSERT(result != end()), &result->data();
121class QAbstractItemModel;
122class QPersistentModelIndex;
126 friend class QAbstractItemModel;
130 constexpr inline int row()
const noexcept {
return r; }
131 constexpr inline int column()
const noexcept {
return c; }
142 constexpr inline const QAbstractItemModel *
model()
const noexcept {
return m.get(); }
143 constexpr inline bool isValid()
const noexcept {
return (r >= 0) && (c >= 0) && (m !=
nullptr); }
148 return lhs.r == rhs.r && lhs.c == rhs.c && lhs.i == rhs.i && lhs.m == rhs.m;
152 if (
auto val = Qt::compareThreeWay(lhs.r, rhs.r); !is_eq(val))
154 if (
auto val = Qt::compareThreeWay(lhs.c, rhs.c); !is_eq(val))
156 if (
auto val = Qt::compareThreeWay(lhs.i, rhs.i); !is_eq(val))
158 if (
auto val = Qt::compareThreeWay(lhs.m, rhs.m); !is_eq(val))
160 return Qt::strong_ordering::equivalent;
170 Qt::totally_ordered_wrapper<
const QAbstractItemModel *> m;
174#ifndef QT_NO_DEBUG_STREAM
181size_t qHash(
const QPersistentModelIndex &index, size_t seed = 0)
noexcept;
186 QPersistentModelIndex();
187 QPersistentModelIndex(
const QModelIndex &index);
188 QPersistentModelIndex(
const QPersistentModelIndex &other);
189 ~QPersistentModelIndex();
190#if QT_CORE_REMOVED_SINCE(6
, 8
)
191 bool operator<(
const QPersistentModelIndex &other)
const noexcept;
192 bool operator==(
const QPersistentModelIndex &other)
const noexcept;
193 inline bool operator!=(
const QPersistentModelIndex &other)
const noexcept
194 {
return !operator==(other); }
196 QPersistentModelIndex &operator=(
const QPersistentModelIndex &other);
197 inline QPersistentModelIndex(QPersistentModelIndex &&other)
noexcept
198 : d(std::exchange(other.d,
nullptr)) {}
199 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QPersistentModelIndex)
200 void swap(QPersistentModelIndex &other)
noexcept { qt_ptr_swap(d, other.d); }
201#if QT_CORE_REMOVED_SINCE(6
, 8
)
202 bool operator==(
const QModelIndex &other)
const noexcept;
203 bool operator!=(
const QModelIndex &other)
const noexcept;
205 QPersistentModelIndex &operator=(
const QModelIndex &other);
206 operator QModelIndex()
const;
209 void *internalPointer()
const;
210 const void *constInternalPointer()
const;
211 quintptr internalId()
const;
212 QModelIndex parent()
const;
213 QModelIndex sibling(
int row,
int column)
const;
214 QVariant data(
int role = Qt::DisplayRole)
const;
215 void multiData(QModelRoleDataSpan roleDataSpan)
const;
216 Qt::ItemFlags flags()
const;
217 const QAbstractItemModel *model()
const;
218 bool isValid()
const;
220 QPersistentModelIndexData *d;
221 friend size_t qHash(
const QPersistentModelIndex &, size_t seed)
noexcept;
222 friend bool qHashEquals(
const QPersistentModelIndex &a,
const QPersistentModelIndex &b)
noexcept
223 {
return a.d == b.d; }
224 friend Q_CORE_EXPORT
bool
225 comparesEqual(
const QPersistentModelIndex &lhs,
const QPersistentModelIndex &rhs)
noexcept;
226 friend Q_CORE_EXPORT
bool
227 comparesEqual(
const QPersistentModelIndex &lhs,
const QModelIndex &rhs)
noexcept;
228 friend Q_CORE_EXPORT Qt::strong_ordering
229 compareThreeWay(
const QPersistentModelIndex &lhs,
const QPersistentModelIndex &rhs)
noexcept;
230 friend Q_CORE_EXPORT Qt::strong_ordering
231 compareThreeWay(
const QPersistentModelIndex &lhs,
const QModelIndex &rhs)
noexcept;
232#if !QT_CORE_REMOVED_SINCE(6
, 8
)
233 Q_DECLARE_STRONGLY_ORDERED(QPersistentModelIndex)
234 Q_DECLARE_STRONGLY_ORDERED(QPersistentModelIndex, QModelIndex)
236#ifndef QT_NO_DEBUG_STREAM
237 friend Q_CORE_EXPORT QDebug operator<<(QDebug,
const QPersistentModelIndex &);
242inline size_t qHash(
const QPersistentModelIndex &index, size_t seed)
noexcept
243{
return qHash(index.d, seed); }
246#ifndef QT_NO_DEBUG_STREAM
247Q_CORE_EXPORT
QDebug operator<<(QDebug,
const QPersistentModelIndex &);
253class QAbstractItemModelPrivate;
255template <
class Key,
class T>
class QMap;
262 friend class QPersistentModelIndexData;
263 friend class QAbstractItemViewPrivate;
264 friend class QAbstractProxyModel;
267 explicit QAbstractItemModel(QObject *parent =
nullptr);
268 virtual ~QAbstractItemModel();
270 Q_INVOKABLE
bool hasIndex(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
271 Q_INVOKABLE
virtual QModelIndex index(
int row,
int column,
272 const QModelIndex &parent = QModelIndex())
const = 0;
273 Q_INVOKABLE
virtual QModelIndex parent(
const QModelIndex &child)
const = 0;
275 Q_INVOKABLE
virtual QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const;
276 Q_INVOKABLE
virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const = 0;
277 Q_INVOKABLE
virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const = 0;
278 Q_INVOKABLE
virtual bool hasChildren(
const QModelIndex &parent = QModelIndex())
const;
280 Q_INVOKABLE
virtual QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const = 0;
281 Q_INVOKABLE
virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
283 Q_INVOKABLE
virtual QVariant headerData(
int section, Qt::Orientation orientation,
284 int role = Qt::DisplayRole)
const;
285 virtual bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &value,
286 int role = Qt::EditRole);
288 virtual QMap<
int, QVariant> itemData(
const QModelIndex &index)
const;
289 virtual bool setItemData(
const QModelIndex &index,
const QMap<
int, QVariant> &roles);
290 virtual bool clearItemData(
const QModelIndex &index);
292 virtual QStringList mimeTypes()
const;
293 virtual QMimeData *mimeData(
const QModelIndexList &indexes)
const;
294 virtual bool canDropMimeData(
const QMimeData *data, Qt::DropAction action,
295 int row,
int column,
const QModelIndex &parent)
const;
296 virtual bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
297 int row,
int column,
const QModelIndex &parent);
298 virtual Qt::DropActions supportedDropActions()
const;
299 virtual Qt::DropActions supportedDragActions()
const;
301 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
302 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool insertColumns(
int column,
int count,
const QModelIndex &parent = QModelIndex());
303 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
304 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool removeColumns(
int column,
int count,
const QModelIndex &parent = QModelIndex());
305 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool moveRows(
const QModelIndex &sourceParent,
int sourceRow,
int count,
306 const QModelIndex &destinationParent,
int destinationChild);
307 Q_INVOKABLE Q_REVISION(6, 4)
virtual bool moveColumns(
const QModelIndex &sourceParent,
int sourceColumn,
int count,
308 const QModelIndex &destinationParent,
int destinationChild);
310 Q_INVOKABLE Q_REVISION(6, 4)
inline bool insertRow(
int row,
const QModelIndex &parent = QModelIndex());
311 Q_INVOKABLE Q_REVISION(6, 4)
inline bool insertColumn(
int column,
const QModelIndex &parent = QModelIndex());
312 Q_INVOKABLE Q_REVISION(6, 4)
inline bool removeRow(
int row,
const QModelIndex &parent = QModelIndex());
313 Q_INVOKABLE Q_REVISION(6, 4)
inline bool removeColumn(
int column,
const QModelIndex &parent = QModelIndex());
314 Q_INVOKABLE Q_REVISION(6, 4)
inline bool moveRow(
const QModelIndex &sourceParent,
int sourceRow,
315 const QModelIndex &destinationParent,
int destinationChild);
316 Q_INVOKABLE Q_REVISION(6, 4)
inline bool moveColumn(
const QModelIndex &sourceParent,
int sourceColumn,
317 const QModelIndex &destinationParent,
int destinationChild);
319 Q_INVOKABLE
virtual void fetchMore(
const QModelIndex &parent);
320 Q_INVOKABLE
virtual bool canFetchMore(
const QModelIndex &parent)
const;
321 Q_INVOKABLE
virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
322 Q_INVOKABLE Q_REVISION(6, 4)
virtual void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder);
323 virtual QModelIndex buddy(
const QModelIndex &index)
const;
324 Q_INVOKABLE
virtual QModelIndexList match(
const QModelIndex &start,
int role,
325 const QVariant &value,
int hits = 1,
326 Qt::MatchFlags flags =
327 Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap))
const;
328 virtual QSize span(
const QModelIndex &index)
const;
330 virtual QHash<
int,QByteArray> roleNames()
const;
332 using QObject::parent;
334 enum LayoutChangeHint
340 Q_ENUM(LayoutChangeHint)
342 enum class CheckIndexOption {
344 IndexIsValid = 0x0001,
345 DoNotUseParent = 0x0002,
346 ParentIsInvalid = 0x0004,
348 Q_ENUM(CheckIndexOption)
349 Q_DECLARE_FLAGS(CheckIndexOptions, CheckIndexOption)
351 [[nodiscard]]
bool checkIndex(
const QModelIndex &index, CheckIndexOptions options = CheckIndexOption::NoOption)
const;
353 virtual void multiData(
const QModelIndex &index, QModelRoleDataSpan roleDataSpan)
const;
356 void dataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
357 const QList<
int> &roles = QList<
int>());
358 void headerDataChanged(Qt::Orientation orientation,
int first,
int last);
359 void layoutChanged(
const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
360 void layoutAboutToBeChanged(
const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
362 void rowsAboutToBeInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
363 void rowsInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
365 void rowsAboutToBeRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
366 void rowsRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
368 void columnsAboutToBeInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
369 void columnsInserted(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
371 void columnsAboutToBeRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
372 void columnsRemoved(
const QModelIndex &parent,
int first,
int last, QPrivateSignal);
374 void modelAboutToBeReset(QPrivateSignal);
375 void modelReset(QPrivateSignal);
377 void rowsAboutToBeMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationRow, QPrivateSignal);
378 void rowsMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationRow, QPrivateSignal);
380 void columnsAboutToBeMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationColumn, QPrivateSignal);
381 void columnsMoved(
const QModelIndex &sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex &destinationParent,
int destinationColumn, QPrivateSignal);
384 virtual bool submit();
385 virtual void revert();
388 virtual void resetInternalData();
391 QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent =
nullptr);
393 inline QModelIndex createIndex(
int row,
int column,
const void *data =
nullptr)
const;
394 inline QModelIndex createIndex(
int row,
int column, quintptr id)
const;
396 void encodeData(
const QModelIndexList &indexes, QDataStream &stream)
const;
397 bool decodeData(
int row,
int column,
const QModelIndex &parent, QDataStream &stream);
399 void beginInsertRows(
const QModelIndex &parent,
int first,
int last);
400 void endInsertRows();
402 void beginRemoveRows(
const QModelIndex &parent,
int first,
int last);
403 void endRemoveRows();
405 bool beginMoveRows(
const QModelIndex &sourceParent,
int sourceFirst,
int sourceLast,
const QModelIndex &destinationParent,
int destinationRow);
408 void beginInsertColumns(
const QModelIndex &parent,
int first,
int last);
409 void endInsertColumns();
411 void beginRemoveColumns(
const QModelIndex &parent,
int first,
int last);
412 void endRemoveColumns();
414 bool beginMoveColumns(
const QModelIndex &sourceParent,
int sourceFirst,
int sourceLast,
const QModelIndex &destinationParent,
int destinationColumn);
415 void endMoveColumns();
417 void beginResetModel();
418 void endResetModel();
420 void changePersistentIndex(
const QModelIndex &from,
const QModelIndex &to);
421 void changePersistentIndexList(
const QModelIndexList &from,
const QModelIndexList &to);
422 QModelIndexList persistentIndexList()
const;
425 Q_DECLARE_PRIVATE(QAbstractItemModel)
426 Q_DISABLE_COPY(QAbstractItemModel)
429Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractItemModel::CheckIndexOptions)
431inline bool QAbstractItemModel::insertRow(
int arow,
const QModelIndex &aparent)
432{
return insertRows(arow, 1, aparent); }
433inline bool QAbstractItemModel::insertColumn(
int acolumn,
const QModelIndex &aparent)
434{
return insertColumns(acolumn, 1, aparent); }
435inline bool QAbstractItemModel::removeRow(
int arow,
const QModelIndex &aparent)
436{
return removeRows(arow, 1, aparent); }
437inline bool QAbstractItemModel::removeColumn(
int acolumn,
const QModelIndex &aparent)
438{
return removeColumns(acolumn, 1, aparent); }
439inline bool QAbstractItemModel::moveRow(
const QModelIndex &sourceParent,
int sourceRow,
440 const QModelIndex &destinationParent,
int destinationChild)
441{
return moveRows(sourceParent, sourceRow, 1, destinationParent, destinationChild); }
442inline bool QAbstractItemModel::moveColumn(
const QModelIndex &sourceParent,
int sourceColumn,
443 const QModelIndex &destinationParent,
int destinationChild)
444{
return moveColumns(sourceParent, sourceColumn, 1, destinationParent, destinationChild); }
445inline QModelIndex QAbstractItemModel::createIndex(
int arow,
int acolumn,
const void *adata)
const
446{
return QModelIndex(arow, acolumn, adata,
this); }
447inline QModelIndex QAbstractItemModel::createIndex(
int arow,
int acolumn, quintptr aid)
const
448{
return QModelIndex(arow, acolumn, aid,
this); }
455 explicit QAbstractTableModel(QObject *parent =
nullptr);
456 ~QAbstractTableModel();
458 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
459 QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const override;
460 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
461 int row,
int column,
const QModelIndex &parent) override;
463 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
465 using QObject::parent;
468 QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent);
471 Q_DISABLE_COPY(QAbstractTableModel)
472 QModelIndex parent(
const QModelIndex &child)
const override;
473 bool hasChildren(
const QModelIndex &parent)
const override;
481 explicit QAbstractListModel(QObject *parent =
nullptr);
482 ~QAbstractListModel();
484 QModelIndex index(
int row,
int column = 0,
const QModelIndex &parent = QModelIndex())
const override;
485 QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const override;
486 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
487 int row,
int column,
const QModelIndex &parent) override;
489 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
491 using QObject::parent;
494 QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent);
497 Q_DISABLE_COPY(QAbstractListModel)
498 QModelIndex parent(
const QModelIndex &child)
const override;
499 int columnCount(
const QModelIndex &parent)
const override;
500 bool hasChildren(
const QModelIndex &parent)
const override;
506{
return m ? m->parent(*
this) : QModelIndex(); }
509{
return m ? (r == arow && c == acolumn) ? *
this : m->sibling(arow, acolumn, *
this) : QModelIndex(); }
512{
return m ? (c == acolumn) ? *
this : m->sibling(r, acolumn, *
this) : QModelIndex(); }
515{
return m ? (r == arow) ? *
this : m->sibling(arow, c, *
this) : QModelIndex(); }
518{
return m ? m->data(*
this, arole) : QVariant(); }
521{
if (m) m->multiData(*
this, roleDataSpan); }
524{
return m ? m->flags(*
this) : Qt::ItemFlags(); }
528#if QT_VERSION >= QT_VERSION_CHECK(7
, 0
, 0
)
529 return qHashMulti(seed, index.row(), index.column(), index.internalId());
531 return size_t((size_t(index.row()) << 4) + size_t(index.column()) + index.internalId()) ^ seed;
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...
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,...)