Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlmodelindexvaluetype.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
7
11QString QQmlModelIndexValueType::propertiesString(const QModelIndex &idx)
12{
13 if (!idx.isValid())
14 return QLatin1String("()");
15 return QString(QLatin1String("(%1,%2,0x%3,%4(0x%5))"))
16 .arg(idx.row()).arg(idx.column()).arg(idx.internalId(), 0, 16)
17 .arg(QLatin1String(idx.model()->metaObject()->className())).arg(quintptr(idx.model()), 0, 16);
18}
19
24{
25 return QString(QLatin1String("QItemSelectionRange(%1,%2)"))
26 .arg(reinterpret_cast<const QQmlPersistentModelIndexValueType *>(&v.topLeft())->toString())
27 .arg(reinterpret_cast<const QQmlPersistentModelIndexValueType *>(&v.bottomRight())->toString());
28}
29
31
32#include "moc_qqmlmodelindexvaluetype_p.cpp"
\inmodule QtCore
constexpr int row() const noexcept
Returns the row this model index refers to.
constexpr const QAbstractItemModel * model() const noexcept
Returns a pointer to the model containing the item that this index refers to.
constexpr int column() const noexcept
Returns the column this model index refers to.
constexpr bool isValid() const noexcept
Returns {true} if this model index is valid; otherwise returns {false}.
constexpr quintptr internalId() const noexcept
Returns a {quintptr} used by the model to associate the index with the internal data structure.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
Definition qstring.cpp:8870
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
size_t quintptr
Definition qtypes.h:167