7#include <QtCore/qtimer.h>
8#include <QtCore/qdir.h>
9#include <QtQmlModels/private/qqmldelegatemodel_p.h>
10#include <QtQmlModels/private/qqmldelegatemodel_p_p.h>
11#include <QtQml/private/qqmlincubator_p.h>
12#include <QtQmlModels/private/qqmlchangeset_p.h>
13#include <QtQml/qqmlinfo.h>
15#include <QtQuick/private/qquickflickable_p_p.h>
16#include <QtQuick/private/qquickitemviewfxitem_p_p.h>
17#include <QtQuick/private/qquicktaphandler_p.h>
1513#define Q_TABLEVIEW_UNREACHABLE(output) { dumpTable(); qWarning() << "output:" << output; Q_UNREACHABLE(); }
1514#define Q_TABLEVIEW_ASSERT(cond, output) Q_ASSERT((cond) || [&](){ dumpTable(); qWarning() << "output:" << output; return false;}())
1525#define TV_REBUILDSTATE(STATE) \
1526 case QQuickTableViewPrivate::RebuildState::STATE: \
1527 dbg << QStringLiteral(#STATE); break;
1547#define TV_REBUILDOPTION(OPTION) \
1548 if (options & QQuickTableViewPrivate::RebuildOption::OPTION) \
1549 dbg << QStringLiteral(#OPTION)
1583 return index <= startIndex;
1586 return index >= startIndex;
1590 const int s = std::min(startIndex, endIndex);
1591 const int e = std::max(startIndex, endIndex);
1613 if (
auto item = fxTableItem->item) {
1614 if (fxTableItem->ownItem)
1630 return QString(
QLatin1String(
"table cells: (%1,%2) -> (%3,%4), item count: %5, table rect: %6,%7 x %8,%9"))
1643 std::stable_sort(listCopy.begin(), listCopy.end(),
1645 { return lhs->index < rhs->index; });
1648 for (
int i = 0;
i < listCopy.size(); ++
i)
1664 if (!tableInstanceModel) {
1677 bool wasRequired =
false;
1692 if (propertyList.contains(propertyName)) {
1693 const auto metaObject =
object->metaObject();
1695 const auto metaProperty =
metaObject->property(propertyIndex);
1696 metaProperty.write(
object,
value);
1709 if (propertyList.contains(propertyName)) {
1712 const auto metaProperty =
metaObject->property(propertyIndex);
1731 qmlWarning(q_func()) <<
"Cannot start selection: no SelectionModel assigned!";
1737 qmlWarning(
q) <<
"Cannot start selection: TableView.selectionBehavior == TableView.SelectionDisabled";
1759 const QModelIndex startIndex =
q->index(startCell.y(), startCell.x());
1778 qmlWarning(q_func()) <<
"Cannot set selection: no SelectionModel assigned!";
1794 if (
pos.x() == -1) {
1835 qmlWarning(q_func()) <<
"Cannot set selection: no SelectionModel assigned!";
1896 return q->cellAtPosition(clampedPos,
true);
1911 const QModelIndex endIndex =
qaim->
index(newRect.y() + newRect.height(), newRect.x() + newRect.width());
1919 if (oldRect.x() < newRect.x()) {
1926 }
else if (oldRect.x() + oldRect.width() > newRect.x() + newRect.width()) {
1928 const QModelIndex endIndex =
qaim->
index(oldRect.y() + oldRect.height(), oldRect.x() + oldRect.width());
1935 if (oldRect.y() < newRect.y()) {
1942 }
else if (oldRect.y() + oldRect.height() > newRect.y() + newRect.height()) {
1944 const QModelIndex endIndex =
qaim->
index(oldRect.y() + oldRect.height(), oldRect.x() + oldRect.width());
2003 if (bottomRightCell.x() < topLeftCell.x())
2004 std::swap(topLeftCell.rx(), bottomRightCell.rx());
2006 std::swap(topLeftCell.ry(), bottomRightCell.ry());
2027 left =
q->contentWidth();
2032 top =
q->contentHeight();
2037 right =
q->contentWidth();
2076 if (remainingDist > 0 || !firstColumnLoaded) {
2078 if (firstColumnLoaded)
2079 stepX =
qMin(stepX, remainingDist);
2080 q->setContentX(
q->contentX() - stepX);
2083 }
else if (outsideRight) {
2086 if (remainingDist > 0 || !lastColumnLoaded) {
2088 if (lastColumnLoaded)
2089 stepX =
qMin(stepX, remainingDist);
2090 q->setContentX(
q->contentX() + stepX);
2098 if (remainingDist > 0 || !firstRowLoaded) {
2101 stepY =
qMin(stepY, remainingDist);
2102 q->setContentY(
q->contentY() - stepY);
2105 }
else if (outsideBottom) {
2108 if (remainingDist > 0 || !lastRowLoaded) {
2111 stepY =
qMin(stepY, remainingDist);
2112 q->setContentY(
q->contentY() + stepY);
2138 return (cell.
y() * availableColumns) + cell.
x();
2141 return (cell.
x() * availableRows) + cell.
y();
2152 int row = int(modelIndex / availableColumns);
2153 int column = modelIndex % availableColumns;
2157 int column = int(modelIndex / availableRows);
2158 int row = modelIndex % availableRows;
2167 const QPoint cell = q_func()->cellAtIndex(modelIndex);
2175 return int(
log2(
float(edge)));
2191 int startIndex = -1;
2209 if (cachedResult.containsIndex(edge, startIndex))
2215 int testIndex = startIndex;
2220 if (testIndex < 0) {
2226 foundIndex = testIndex;
2241 foundIndex = testIndex;
2250 if (testIndex < 0) {
2256 foundIndex = testIndex;
2271 foundIndex = testIndex;
2280 cachedResult.startIndex = startIndex;
2281 cachedResult.endIndex = foundIndex;
2315 q->QQuickFlickable::setContentWidth(0);
2323 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2327 q->QQuickFlickable::setContentWidth(estimatedWidth);
2351 q->QQuickFlickable::setContentHeight(0);
2359 const qreal estimatedRemainingHeight = remainingRowHeights + remainingSpacing;
2363 q->QQuickFlickable::setContentHeight(estimatedHeight);
2381 bool tableMovedHorizontally =
false;
2382 bool tableMovedVertically =
false;
2390 const auto syncView_d =
syncView->d_func();
2391 origin.
rx() = syncView_d->origin.x();
2406 tableMovedHorizontally =
true;
2415 const int columnsRemaining = nextLeftColumn + 1;
2418 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2434 tableMovedHorizontally =
true;
2443 const int columnsRemaining =
tableSize.
width() - nextRightColumn;
2446 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2448 endExtent.
rwidth() = pixelsOutsideContentWidth + estimatedRemainingWidth;
2453 const auto syncView_d =
syncView->d_func();
2454 origin.
ry() = syncView_d->origin.y();
2469 tableMovedVertically =
true;
2478 const int rowsRemaining = nextTopRow + 1;
2481 const qreal estimatedRemainingHeight = remainingRowHeights + remainingSpacing;
2497 tableMovedVertically =
true;
2509 const qreal estimatedRemainingHeight = remainingRowHeigts + remainingSpacing;
2511 endExtent.
rheight() = pixelsOutsideContentHeight + estimatedRemainingHeight;
2515 if (tableMovedHorizontally || tableMovedVertically) {
2524 auto syncChild_d = syncChild->d_func();
2526 if (tableMovedHorizontally)
2528 if (tableMovedVertically)
2612 if (wasVisibleFromBefore == isVisibleNow)
2617 qCDebug(lcTableViewDelegateLifecycle) <<
"Column" <<
column <<
"changed visibility to" << isVisibleNow;
2641 if (wasVisibleFromBefore == isVisibleNow)
2646 qCDebug(lcTableViewDelegateLifecycle) <<
"Row" <<
row <<
"changed visibility to" << isVisibleNow;
2684 const bool updated = rootView->d_func()->updateTableRecursive();
2686 qWarning() <<
"TableView::forceLayout(): Cannot do an immediate re-layout during an ongoing layout!";
2724 bool ownItem =
false;
2737 qWarning() <<
"TableView: failed loading index:" << modelIndex;
2746 qWarning() <<
"TableView: delegate is not an item:" << modelIndex;
2753 qmlWarning(
item) <<
"TableView: detected anchors on delegate with index: " << modelIndex
2754 <<
". Use implicitWidth and implicitHeight instead.";
2768 fxTableItem->setVisible(
false);
2769 fxTableItem->cell = cell;
2770 fxTableItem->index = modelIndex;
2779 static const bool forcedAsync = forcedIncubationMode ==
QLatin1String(
"async");
2788 qCDebug(lcTableViewDelegateLifecycle) << cell <<
"ready?" << bool(
item);
2806 auto item = fxTableItem->item;
2808 if (fxTableItem->ownItem) {
2814 fxTableItem->setVisible(
false);
2843 switch (tableEdge) {
2863 switch (tableEdge) {
2947 qreal columnWidth = 0;
2957 qreal rowHeight = 0;
2982 if (explicitColumnWidth >= 0)
2983 return explicitColumnWidth;
2997 if (
qIsNaN(columnWidth) || columnWidth <= 0) {
3000 qmlWarning(q_func()) <<
"the delegate's implicitWidth needs to be greater than zero";
3044 if (explicitRowHeight >= 0)
3045 return explicitRowHeight;
3049 return syncView->d_func()->getRowLayoutHeight(
row);
3059 if (
qIsNaN(rowHeight) || rowHeight <= 0) {
3062 qmlWarning(q_func()) <<
"the delegate's implicitHeight needs to be greater than zero";
3078 const int noExplicitColumnWidth = -1;
3090 qreal explicitColumnWidth =
q->explicitColumnWidth(
column);
3091 if (explicitColumnWidth >= 0)
3092 return explicitColumnWidth;
3093 return noExplicitColumnWidth;
3096 qreal columnWidth = noExplicitColumnWidth;
3101 if (
qIsNaN(columnWidth) || columnWidth < 0)
3102 columnWidth = noExplicitColumnWidth;
3106 qmlWarning(q_func()) <<
"columnWidthProvider doesn't contain a function";
3108 columnWidth = noExplicitColumnWidth;
3124 const int noExplicitRowHeight = -1;
3136 qreal explicitRowHeight =
q->explicitRowHeight(
row);
3137 if (explicitRowHeight >= 0)
3138 return explicitRowHeight;
3139 return noExplicitRowHeight;
3142 qreal rowHeight = noExplicitRowHeight;
3147 if (
qIsNaN(rowHeight) || rowHeight < 0)
3148 rowHeight = noExplicitRowHeight;
3152 qmlWarning(q_func()) <<
"rowHeightProvider doesn't contain a function";
3154 rowHeight = noExplicitRowHeight;
3169 if (subRect.isValid()) {
3177 contentX = columnX + subRect.x() +
offset;
3182 contentX = columnX + subRect.x() - centerDistance +
offset;
3190 contentX = columnX +
offset;
3195 contentX = columnX - centerDistance +
offset;
3200 contentX =
qBound(-
q->minXExtent(), contentX, -
q->maxXExtent());
3212 if (subRect.isValid()) {
3220 contentY = rowY + subRect.y() +
offset;
3225 contentY = rowY + subRect.y() - centerDistance +
offset;
3233 contentY = rowY +
offset;
3238 contentY = rowY - centerDistance +
offset;
3243 contentY =
qBound(-
q->minYExtent(), contentY, -
q->maxYExtent());
3264 qCDebug(lcTableViewDelegateLifecycle);
3268 qCDebug(lcTableViewDelegateLifecycle()) <<
"Skipping relayout, viewport has zero size";
3284 item->setGeometry(geometry);
3300 item->setGeometry(geometry);
3307 if (
Q_UNLIKELY(lcTableViewDelegateLifecycle().isDebugEnabled())) {
3319 int columnThatNeedsLayout;
3320 int neighbourColumn;
3329 columnX = neighbourItem->geometry().left() -
cellSpacing.
width() - columnWidth;
3341 const qreal rowY = neighbourItem->geometry().y();
3342 const qreal rowHeight = neighbourItem->geometry().height();
3344 fxTableItem->setGeometry(
QRectF(columnX, rowY, columnWidth, rowHeight));
3345 fxTableItem->setVisible(
true);
3347 qCDebug(lcTableViewDelegateLifecycle()) <<
"layout item:" <<
QPoint(columnThatNeedsLayout,
row) << fxTableItem->geometry();
3353 int rowThatNeedsLayout;
3357 rowThatNeedsLayout =
topRow();
3369 const qreal columnX = neighbourItem->geometry().x();
3370 const qreal columnWidth = neighbourItem->geometry().width();
3371 fxTableItem->item->setX(columnX);
3372 fxTableItem->item->setWidth(columnWidth);
3389 fxTableItem->item->setY(rowY);
3390 fxTableItem->item->setHeight(rowHeight);
3391 fxTableItem->setVisible(
true);
3393 qCDebug(lcTableViewDelegateLifecycle()) <<
"layout item:" <<
QPoint(
column, rowThatNeedsLayout) << fxTableItem->geometry();
3401 auto item = topLeftItem->item;
3406 qCDebug(lcTableViewDelegateLifecycle) <<
"geometry:" << topLeftItem->geometry();
3448 qCDebug(lcTableViewDelegateLifecycle()) <<
"all items loaded!";
3462 emit q->leftColumnChanged();
3465 emit q->rightColumnChanged();
3468 emit q->topRowChanged();
3471 emit q->bottomRowChanged();
3478 emit q->layoutChanged();
3484 qCDebug(lcTableViewDelegateLifecycle()) <<
"Load request completed!";
3485 qCDebug(lcTableViewDelegateLifecycle()) <<
"****************************************";
3496 :
QMargins(
q->leftColumn(),
q->topRow(),
q->rightColumn(),
q->bottomRow());
3509 qCDebug(lcTableViewDelegateLifecycle()) <<
"no items loaded!";
3564 emit q->columnsChanged();
3566 emit q->rowsChanged();
3568 emit q->leftColumnChanged();
3570 emit q->rightColumnChanged();
3572 emit q->topRowChanged();
3574 emit q->bottomRowChanged();
3580 emit q->layoutChanged();
3583 qCDebug(lcTableViewDelegateLifecycle()) <<
"rebuild completed!";
3584 qCDebug(lcTableViewDelegateLifecycle()) <<
"################################################";
3585 qCDebug(lcTableViewDelegateLifecycle());
3619 const auto syncView_d =
syncView->d_func();
3621 if (syncView_d->loadedItems.isEmpty()) {
3622 topLeftCell.rx() = 0;
3623 topLeftCell.ry() = 0;
3628 const QPoint syncViewTopLeftCell(syncView_d->leftColumn(), syncView_d->topRow());
3629 const auto syncViewTopLeftFxItem = syncView_d->loadedTableItem(syncViewTopLeftCell);
3630 const QPointF syncViewTopLeftPos = syncViewTopLeftFxItem->geometry().topLeft();
3633 topLeftCell.
rx() = syncViewTopLeftCell.x();
3634 topLeftPos.rx() = syncViewTopLeftPos.x();
3644 topLeftCell.ry() = syncViewTopLeftCell.y();
3645 topLeftPos.ry() = syncViewTopLeftPos.y();
3734 qCDebug(lcTableViewDelegateLifecycle()) <<
"initial top left cell:" << topLeft <<
", pos:" << topLeftPos;
3772 qCDebug(lcTableViewDelegateLifecycle()) <<
"no model found, leaving table empty";
3777 qCDebug(lcTableViewDelegateLifecycle()) <<
"empty model found, leaving table empty";
3782 qCDebug(lcTableViewDelegateLifecycle()) <<
"no delegate found, leaving table empty";
3787 qCDebug(lcTableViewDelegateLifecycle()) <<
"no visible row or column found, leaving table empty";
3792 qCDebug(lcTableViewDelegateLifecycle()) <<
"could not resolve top-left item, leaving table empty";
3797 qCDebug(lcTableViewDelegateLifecycle()) <<
"viewport has zero size, leaving table empty";
3885 const bool cancelVertically = positionVertically && !
syncVertically;
3888 if (cancelHorizontally && !
qFuzzyIsNull(
q->horizontalOvershoot())) {
3889 qCDebug(lcTableViewDelegateLifecycle()) <<
"cancelling overshoot horizontally:" <<
q->horizontalOvershoot();
3894 if (cancelVertically && !
qFuzzyIsNull(
q->verticalOvershoot())) {
3895 qCDebug(lcTableViewDelegateLifecycle()) <<
"cancelling overshoot vertically:" <<
q->verticalOvershoot();
3904 qCDebug(lcTableViewDelegateLifecycle) << edge;
3914 emit q->leftColumnChanged();
3923 emit q->rightColumnChanged();
3932 emit q->topRowChanged();
3941 emit q->bottomRowChanged();
3946 emit q->layoutChanged();
3954 qCDebug(lcTableViewDelegateLifecycle) << edge << edgeIndex << q_func();
3990 tableModified =
false;
3993 tableModified =
true;
3998 tableModified =
true;
4003 }
while (tableModified);
4046 const int minTime = int(std::ceil(
w >
h ?
qreal(
w + 1) /
h :
qreal(
h + 1) /
w));
4047 const int maxTime = minTime * 2;
4052 if (!q_func()->isComponentComplete()) {
4090 if (!updateComplete)
4095 auto syncChild_d = syncChild->d_func();
4103 const bool descendantUpdateComplete = syncChild_d->updateTableRecursive();
4104 if (!descendantUpdateComplete)
4176 const auto cppMetaObject =
data->propertyCache->firstCppMetaObject();
4180 return qmlTypeView.metaObjectRevision();
4229 const auto &selectedIndexes = selected.
indexes();
4230 const auto &deselectedIndexes = deselected.indexes();
4231 for (
int i = 0;
i < selectedIndexes.size(); ++
i)
4233 for (
int i = 0;
i < deselectedIndexes.size(); ++
i)
4241 <<
"Cannot select cells: TableView.selectionModel.model is not "
4242 <<
"compatible with the model displayed in the view";
4275 if (modelAsVariant.userType() == qMetaTypeId<QJSValue>())
4277 return qvariant_cast<QAbstractItemModel *>(modelAsVariant);
4285 const int cellIndex = *
it;
4290 const bool editing =
editIndex == q_func()->modelIndex(cell);
4301 <<
"Cannot change current index: TableView.selectionModel.model is not "
4302 <<
"compatible with the model displayed in the view";
4316 const QPoint currentCell =
q->cellAtIndex(currentIndex);
4319 emit q->currentColumnChanged();
4324 emit q->currentRowChanged();
4344 qCDebug(lcTableViewDelegateLifecycle) <<
"item done loading:"
4376 attached->setView(
q);
4384 emit attached->pooled();
4397 if (
auto item = qobject_cast<QQuickItem*>(
object))
4401 emit attached->reused();
4471 emit q_func()->modelChanged();
4486 if (effectiveModelVariant.userType() == qMetaTypeId<QJSValue>())
4489 const auto instanceModel = qobject_cast<QQmlInstanceModel *>(qvariant_cast<QObject*>(effectiveModelVariant));
4491 if (instanceModel) {
4496 model = instanceModel;
4512 syncView->d_func()->syncChildren.removeOne(
q);
4521 qmlWarning(
q) <<
"TableView: recursive syncView connection detected!";
4575 const auto syncView_d =
syncView->d_func();
4576 if (!syncView_d->loadedItems.isEmpty()) {
4754 return (model1 == model2 ||
4755 (model1.userType() == qMetaTypeId<QJSValue>() && model2.userType() == qMetaTypeId<QJSValue>() &&
4828 const qreal diffY =
qAbs(newContentY -
q->contentY());
4829 const qreal duration =
qBound(700., diffY * 5, 1500.);
4835 q->setContentY(newContentY);
4870 const qreal diffX =
qAbs(newContentX -
q->contentX());
4871 const qreal duration =
qBound(700., diffX * 5, 1500.);
4877 q->setContentX(newContentX);
4918 q->setContentX(contentX);
4932 q->setContentY(contentY);
4949 auto syncChild_d = syncChild->d_func();
4950 if (syncChild_d->syncHorizontally)
4951 w =
qMax(
w, syncChild->width());
4952 if (syncChild_d->syncHorizontally)
4953 h =
qMax(
h, syncChild->height());
4964 q->setActiveFocusOnTab(
true);
4988 if (!tapHandler->isPressed())
4994 if (!
q->isInteractive())
4999 if (
q->isInteractive())
5007 if (resizeRow || resizeColumn) {
5013 const QPointF pos = tapHandler->point().pressPosition();
5039 bool tappedCellIsSelected =
false;
5044 if (
canEdit(tappedIndex,
false)) {
5048 q->edit(tappedIndex);
5051 q->edit(tappedIndex);
5074 if (!tappedIndex.isValid()) {
5076 qmlWarning(
q) <<
"cannot edit: index is not valid!";
5083 qmlWarning(
q) <<
"cannot edit: QAbstractItemModel::flags(index) doesn't contain Qt::ItemIsEditable";
5088 const QPoint cell =
q->cellAtIndex(tappedIndex);
5092 qmlWarning(
q) <<
"cannot edit: the cell to edit is not inside the viewport!";
5097 if (!attached || !attached->editDelegate()) {
5099 qmlWarning(
q) <<
"cannot edit: no TableView.editDelegate set!";
5112 auto syncView_d =
syncView->d_func();
5113 if (!syncView_d->inSyncViewportPosRecursive) {
5115 syncView_d->setLocalViewportX(
q->contentX());
5117 syncView_d->setLocalViewportY(
q->contentY());
5118 syncView_d->syncViewportPosRecursive();
5123 auto syncChild_d = syncChild->d_func();
5124 if (!syncChild_d->inSyncViewportPosRecursive) {
5125 if (syncChild_d->syncHorizontally)
5126 syncChild_d->setLocalViewportX(
q->contentX());
5127 if (syncChild_d->syncVertically)
5128 syncChild_d->setLocalViewportY(
q->contentY());
5129 syncChild_d->syncViewportPosRecursive();
5150 const auto index = q_func()->modelIndex(cell);
5162 const QPoint currentCell =
q->cellAtIndex(currentIndex);
5164 if (!
q->activeFocusOnTab()) {
5193 auto beginMoveCurrentIndex = [&](){
5196 if (!shouldSelect) {
5199 }
else if (startNewSelection) {
5215 auto endMoveCurrentIndex = [&](
const QPoint &cell){
5233 beginMoveCurrentIndex();
5239 endMoveCurrentIndex({currentCell.
x(), nextRow});
5242 beginMoveCurrentIndex();
5248 endMoveCurrentIndex({currentCell.
x(), nextRow});
5251 beginMoveCurrentIndex();
5257 endMoveCurrentIndex({nextColumn, currentCell.
y()});
5260 beginMoveCurrentIndex();
5266 endMoveCurrentIndex({nextColumn, currentCell.
y()});
5269 int newBottomRow = -1;
5270 beginMoveCurrentIndex();
5283 endMoveCurrentIndex(
QPoint(currentCell.
x(), newBottomRow));
5287 beginMoveCurrentIndex();
5288 if (currentCell.
y() >
topRow()) {
5300 endMoveCurrentIndex(
QPoint(currentCell.
x(), newTopRow));
5303 beginMoveCurrentIndex();
5306 endMoveCurrentIndex(
QPoint(firstColumn, currentCell.
y()));
5309 beginMoveCurrentIndex();
5312 endMoveCurrentIndex(
QPoint(lastColumn, currentCell.
y()));
5315 beginMoveCurrentIndex();
5316 int nextRow = currentCell.
y();
5329 marginX =
q->leftMargin();
5331 marginX = -
q->leftMargin();
5334 endMoveCurrentIndex({nextColumn, nextRow});
5337 beginMoveCurrentIndex();
5338 int nextRow = currentCell.
y();
5351 marginX =
q->leftMargin();
5353 marginX = -
q->leftMargin();
5356 endMoveCurrentIndex({nextColumn, nextRow});
5381 if (!attached || !attached->editDelegate())
5384 bool anyKeyPressed =
false;
5385 bool editKeyPressed =
false;
5393 anyKeyPressed =
true;
5394 editKeyPressed =
true;
5404 anyKeyPressed =
true;
5410 if (!(editKeyAccepted || anyKeyAccepted))
5431#if QT_CONFIG(cursor)
5432void QQuickTableViewPrivate::updateCursor()
5456 qApp->changeOverrideCursor(shape);
5458 qApp->setOverrideCursor(shape);
5461 }
else if (m_cursorSet) {
5462 qApp->restoreOverrideCursor();
5463 m_cursorSet =
false;
5476 auto cellItem =
q->itemAtCell(cell);
5509 auto syncView_d =
d->syncView->d_func();
5510 syncView_d->syncChildren.removeOne(
this);
5530 qCDebug(lcTableViewDelegateLifecycle);
5556 return d_func()->tableSize.height();
5561 return d_func()->tableSize.width();
5566 return d_func()->cellSpacing.height();
5585 return d_func()->cellSpacing.width();
5604 return d_func()->rowHeightProvider;
5613 d->rowHeightProvider = provider;
5621 return d_func()->columnWidthProvider;
5630 d->columnWidthProvider = provider;
5638 return d_func()->modelImpl();
5644 if (
d->compareModel(newModel,
d->assignedModel))
5648 d->setModelImpl(newModel);
5649 if (
d->selectionModel)
5650 d->selectionModel->setModel(
d->selectionSourceModel());
5655 return d_func()->assignedDelegate;
5661 if (newDelegate ==
d->assignedDelegate)
5664 d->assignedDelegate = newDelegate;
5672 return d_func()->editTriggers;
5683 emit editTriggersChanged();
5699 if (!reuse &&
d->tableModel) {
5702 d->tableModel->drainReusableItemsPool(0);
5711 d->explicitContentWidth =
width;
5718 d->explicitContentHeight =
height;
5741 return d_func()->assignedSyncView;
5747 if (
d->assignedSyncView ==
view)
5752 d->clearIndexMapping();
5754 d->assignedSyncView =
view;
5757 emit syncViewChanged();
5780 return d_func()->assignedSyncDirection;
5790 if (
d->assignedSyncView)
5793 emit syncDirectionChanged();
5798 return d_func()->selectionModel;
5811 if (
d->selectionModel) {
5820 if (
d->selectionModel) {
5821 d->selectionModel->setModel(
d->selectionSourceModel());
5828 d->updateSelectedOnAllDelegateItems();
5830 emit selectionModelChanged();
5835 return d_func()->animate;
5846 d->positionXAnimation.stop();
5847 d->positionYAnimation.stop();
5850 emit animateChanged();
5855 return d_func()->keyNavigationEnabled;
5861 if (
d->keyNavigationEnabled ==
enabled)
5866 emit keyNavigationEnabledChanged();
5871 return d_func()->pointerNavigationEnabled;
5877 if (
d->pointerNavigationEnabled ==
enabled)
5880 d->pointerNavigationEnabled =
enabled;
5882 emit pointerNavigationEnabledChanged();
5888 return d->loadedItems.isEmpty() ? -1 : d_func()->leftColumn();
5894 return d->loadedItems.isEmpty() ? -1 : d_func()->rightColumn();
5900 return d->loadedItems.isEmpty() ? -1 : d_func()->topRow();
5906 return d->loadedItems.isEmpty() ? -1 : d_func()->bottomRow();
5911 return d_func()->currentRow;
5916 return d_func()->currentColumn;
5922 if (row < 0 || row >=
rows() ||
d->loadedRows.isEmpty())
5931 d->positionViewAtRow(
row, Qt::Alignment(
int(
mode)),
offset, subRect);
5938 if (!subRect.isValid()) {
5941 const qreal subRectTop =
d->loadedTableOuterRect.top() + subRect.top();
5942 const qreal subRectBottom =
d->loadedTableOuterRect.top() + subRect.bottom();
5943 if (subRectTop < d->viewportRect.y())
5945 else if (subRectBottom >
d->viewportRect.bottom())
5949 if (!subRect.isValid()) {
5954 const qreal subRectBottom =
d->loadedTableInnerRect.bottom() + subRect.bottom();
5955 if (subRectBottom >
d->viewportRect.bottom())
5964 }
else if (subRect.isValid()) {
5966 const qreal subRectTop =
d->loadedTableOuterRect.top() + subRect.top();
5967 const qreal subRectBottom =
d->loadedTableOuterRect.top() + subRect.bottom();
5968 if (subRectBottom < d->viewportRect.top())
5970 else if (subRectTop >
d->viewportRect.bottom())
5975 const qreal subRectTop =
d->loadedTableInnerRect.bottom() + subRect.top();
5976 if (subRectTop >
d->viewportRect.bottom())
5988 if (column < 0 || column >=
columns() ||
d->loadedColumns.isEmpty())
6004 if (!subRect.isValid()) {
6007 const qreal subRectLeft =
d->loadedTableOuterRect.left() + subRect.left();
6008 const qreal subRectRight =
d->loadedTableOuterRect.left() + subRect.right();
6009 if (subRectLeft < d->viewportRect.left())
6011 else if (subRectRight >
d->viewportRect.right())
6015 if (!subRect.isValid()) {
6020 const qreal subRectRight =
d->loadedTableInnerRect.right() + subRect.right();
6021 if (subRectRight >
d->viewportRect.right())
6030 }
else if (subRect.isValid()) {
6032 const qreal subRectLeft =
d->loadedTableOuterRect.left() + subRect.left();
6033 const qreal subRectRight =
d->loadedTableOuterRect.left() + subRect.right();
6034 if (subRectRight < d->viewportRect.left())
6036 else if (subRectLeft >
d->viewportRect.right())
6041 const qreal subRectLeft =
d->loadedTableInnerRect.right() + subRect.left();
6042 if (subRectLeft >
d->viewportRect.right())
6055 if (!horizontalMode && !verticalMode) {
6070 if (!horizontalMode && !verticalMode) {
6081#if QT_DEPRECATED_SINCE(6, 5)
6086 if (!horizontalMode && !verticalMode) {
6151 visualData.
prevIndex = visualData.index;
6152 visualData.index = visual;
6153 logicalData.prevIndex = logicalData.index;
6154 logicalData.index = logicalIndex[visual + 1].index;
6161 visualData.
prevIndex = visualData.index;
6162 visualData.index = visual;
6163 logicalData.prevIndex = logicalData.index;
6164 logicalData.index = logicalIndex[visual - 1].index;
6177 auto syncChild_d = syncChild->d_func();
6179 ((syncChild_d->syncHorizontally && orientation ==
Qt::Horizontal) ||
6180 (syncChild_d->syncVertically && orientation ==
Qt::Vertical)))
6192 const int mapIndex =
static_cast<int>(orientation) - 1;
6196 const int prevLogicalIndex = logicalDataIndices[
index].prevIndex;
6198 emit q->columnMoved(prevLogicalIndex, visualDataIndices[prevLogicalIndex].prevIndex, visualDataIndices[prevLogicalIndex].
index);
6200 emit q->rowMoved(prevLogicalIndex, visualDataIndices[prevLogicalIndex].prevIndex, visualDataIndices[prevLogicalIndex].
index);
6205void QQuickTableView::clearColumnReordering()
6211void QQuickTableView::clearRowReordering()
6221 const int mapIndex =
static_cast<int>(orientation) - 1;
6226 syncView->d_func()->clearSection(orientation);
6236 const SectionData *logicalDataIndices = oldLogicalIndices.constData();
6237 const SectionData *visualDataIndices = oldVisualIndices.constData();
6239 const int currentIndex = logicalDataIndices[
index].
index;
6241 emit q->columnMoved(currentIndex, visualDataIndices[currentIndex].
index,
index);
6243 emit q->rowMoved(currentIndex, visualDataIndices[currentIndex].
index,
index);
6251 const int modelIndex =
d->modelIndexAtCell(cell);
6252 if (!
d->loadedItems.contains(modelIndex))
6254 return d->loadedItems.value(modelIndex)->item;
6257#if QT_DEPRECATED_SINCE(6, 5)
6267 const int serializedIndex =
d->modelIndexToCellIndex(
index);
6268 if (!
d->loadedItems.contains(serializedIndex))
6270 return d->loadedItems.value(serializedIndex)->item;
6273#if QT_DEPRECATED_SINCE(6, 4)
6294 if (!
d->loadedTableOuterRect.contains(
position))
6297 const qreal hSpace =
d->cellSpacing.width();
6298 const qreal vSpace =
d->cellSpacing.height();
6299 qreal currentColumnEnd =
d->loadedTableOuterRect.x();
6300 qreal currentRowEnd =
d->loadedTableOuterRect.y();
6302 int foundColumn = -1;
6305 for (
const int column :
d->loadedColumns) {
6306 currentColumnEnd +=
d->getEffectiveColumnWidth(
column);
6311 currentColumnEnd += hSpace;
6321 for (
const int row :
d->loadedRows) {
6322 currentRowEnd +=
d->getEffectiveRowHeight(
row);
6327 currentRowEnd += vSpace;
6338 return QPoint(foundColumn, foundRow);
6341bool QQuickTableView::isColumnLoaded(
int column)
const
6344 if (!
d->loadedColumns.contains(
column))
6357bool QQuickTableView::isRowLoaded(
int row)
const
6360 if (!
d->loadedRows.contains(
row))
6373qreal QQuickTableView::columnWidth(
int column)
const
6376 if (!isColumnLoaded(
column))
6379 return d->getEffectiveColumnWidth(
column);
6382qreal QQuickTableView::rowHeight(
int row)
const
6385 if (!isRowLoaded(
row))
6388 return d->getEffectiveRowHeight(
row);
6391qreal QQuickTableView::implicitColumnWidth(
int column)
const
6394 if (!isColumnLoaded(
column))
6397 return d->sizeHintForColumn(
column);
6400qreal QQuickTableView::implicitRowHeight(
int row)
const
6403 if (!isRowLoaded(
row))
6406 return d->sizeHintForRow(
row);
6413 qmlWarning(
this) <<
"column must be greather than, or equal to, zero";
6417 if (
d->syncHorizontally) {
6426 d->explicitColumnWidths.remove(
d->logicalColumnIndex(
column));
6428 d->explicitColumnWidths.insert(
d->logicalColumnIndex(
column),
size);
6430 if (
d->loadedItems.isEmpty())
6435 d->forceLayout(
false);
6438void QQuickTableView::clearColumnWidths()
6442 if (
d->syncHorizontally) {
6443 d->syncView->clearColumnWidths();
6447 if (
d->explicitColumnWidths.isEmpty())
6450 d->explicitColumnWidths.clear();
6451 d->forceLayout(
false);
6454qreal QQuickTableView::explicitColumnWidth(
int column)
const
6458 if (
d->syncHorizontally)
6459 return d->syncView->explicitColumnWidth(
column);
6461 const auto it =
d->explicitColumnWidths.constFind(
d->logicalColumnIndex(
column));
6462 if (
it !=
d->explicitColumnWidths.constEnd())
6471 qmlWarning(
this) <<
"row must be greather than, or equal to, zero";
6475 if (
d->syncVertically) {
6476 d->syncView->setRowHeight(
row,
size);
6484 d->explicitRowHeights.remove(
d->logicalRowIndex(
row));
6486 d->explicitRowHeights.insert(
d->logicalRowIndex(
row),
size);
6488 if (
d->loadedItems.isEmpty())
6493 d->forceLayout(
false);
6496void QQuickTableView::clearRowHeights()
6500 if (
d->syncVertically) {
6501 d->syncView->clearRowHeights();
6505 if (
d->explicitRowHeights.isEmpty())
6508 d->explicitRowHeights.clear();
6509 d->forceLayout(
false);
6512qreal QQuickTableView::explicitRowHeight(
int row)
const
6516 if (
d->syncVertically)
6517 return d->syncView->explicitRowHeight(
row);
6519 const auto it =
d->explicitRowHeights.constFind(
d->logicalRowIndex(
row));
6520 if (
it !=
d->explicitRowHeights.constEnd())
6528 if (cell.
x() < 0 || cell.
x() >=
columns() || cell.
y() < 0 || cell.
y() >=
rows())
6531 auto const qaim =
d->model->abstractItemModel();
6535 return qaim->index(
d->logicalRowIndex(cell.
y()),
d->logicalColumnIndex(cell.
x()));
6540 if (!
index.isValid() ||
index.parent().isValid())
6543 return {
d->visualColumnIndex(
index.column()),
d->visualRowIndex(
index.row())};
6546#if QT_DEPRECATED_SINCE(6, 4)
6557 qmlWarning(
this) <<
"modelIndex(row, column) is deprecated. "
6558 "Use index(row, column) instead. For more information, see "
6559 "https://doc.qt.io/qt-6/qml-qtquick-tableview-obsolete.html";
6572 return cellAtIndex(
index).y();
6577 return cellAtIndex(
index).x();
6582 d_func()->forceLayout(
true);
6589 if (!
d->canEdit(
index,
true))
6592 if (
d->editIndex ==
index)
6598 if (!
d->editModel) {
6600 d->editModel->useImportVersion(
d->resolveImportVersion());
6602 [
this, d] (
int serializedModelIndex,
QObject *
object) {
6608 const QPoint cell = d->cellAtModelIndex(serializedModelIndex);
6609 d->editIndex = modelIndex({d->visualColumnIndex(cell.x()), d->visualRowIndex(cell.y())});
6614 d->initItemCallback(serializedModelIndex,
object);
6615 const auto cellItem =
itemAtCell(cellAtIndex(
d->editIndex));
6617 d->editItem->setParentItem(cellItem);
6624 if (
d->selectionModel)
6627 if (
d->editIndex.isValid())
6630 const auto cellItem = itemAtCell(cellAtIndex(
index));
6632 const auto attached =
d->getAttachedObject(cellItem);
6635 d->editModel->setModel(
d->tableModel->model());
6636 d->editModel->setDelegate(attached->editDelegate());
6638 const int cellIndex =
d->modelIndexToCellIndex(
index,
false);
6642 d->editItem =
nullptr;
6643 qmlWarning(
this) <<
"cannot edit: TableView.editDelegate could not be instantiated!";
6650 qmlWarning(
this) <<
"cannot edit: TableView.editDelegate is not an Item!";
6651 d->editItem =
nullptr;
6670 if (
QObject *focusObject =
d->editItem->window()->focusObject()) {
6672 if (focusItem ==
d->editItem ||
d->editItem->isAncestorOf(focusItem))
6677void QQuickTableView::closeEditor()
6686 d->editItem =
nullptr;
6689 const int cellIndex =
d->modelIndexToCellIndex(
d->editIndex,
false);
6694 if (
d->editIndex.isValid()) {
6711 if (
d->tableModel) {
6714 d->tableModel->drainReusableItemsPool(0);
6717 d->forceLayout(
false);
6729 if (
d->inSetLocalViewportPos)
6736 d->syncViewportPosRecursive();
6738 auto rootView =
d->rootSyncView();
6739 auto rootView_d = rootView->d_func();
6741 rootView_d->scheduleRebuildIfFastFlick();
6743 if (!rootView_d->polishScheduled) {
6744 if (rootView_d->scheduledRebuildOptions) {
6751 const bool updated = rootView->d_func()->updateTableRecursive();
6765 if (!
d->keyNavigationEnabled) {
6770 if (
d->tableSize.isEmpty())
6773 if (
d->editIndex.isValid()) {
6779 if (
d->setCurrentIndexFromKeyEvent(e))
6782 if (
d->editFromKeyEvent(e))
6795 switch (keyEvent->
key()) {
6798 if (
auto attached =
d->getAttachedObject(
d->editItem))
6799 emit attached->commit();
6805 if (
auto attached =
d->getAttachedObject(
d->editItem))
6806 emit attached->commit();
6808 if (
d->setCurrentIndexFromKeyEvent(keyEvent)) {
6809 const QModelIndex currentIndex =
d->selectionModel->currentIndex();
6810 if (
d->canEdit(currentIndex,
false))
6827 return d_func()->alternatingRows;
6837 emit alternatingRowsChanged();
6842 return d_func()->selectionBehavior;
6852 emit selectionBehaviorChanged();
6857 return d_func()->selectionMode;
6867 emit selectionModeChanged();
6872 return d_func()->resizableColumns;
6878 if (
d->resizableColumns ==
enabled)
6882 d->resizeHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6883 d->hoverHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6885 emit resizableColumnsChanged();
6890 return d_func()->resizableRows;
6900 d->resizeHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6901 d->hoverHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6903 emit resizableRowsChanged();
6917#if QT_CONFIG(cursor)
6920 tableViewPrivate->updateCursor();
6930#if QT_CONFIG(cursor)
6935 const auto item = tableView->itemAtCell(cell);
6939#if QT_CONFIG(cursor)
6940 tableViewPrivate->updateCursor();
6946 const bool hoveringRow = (itemPos.y() <
margin() || itemPos.y() >
item->height() -
margin());
6947 const bool hoveringColumn = (itemPos.x() <
margin() || itemPos.x() >
item->width() -
margin());
6948 m_row = hoveringRow ? itemPos.
y() <
margin() ? cell.
y() - 1 : cell.
y() : -1;
6949 m_column = hoveringColumn ? itemPos.x() <
margin() ? cell.
x() - 1 : cell.
x() : -1;
6950#if QT_CONFIG(cursor)
6951 tableViewPrivate->updateCursor();
6974 switch (transition) {
6997 if (
event->type() == QEvent::Type::Wheel)
7023 m_row = tableViewPrivate->resizableRows ? tableViewPrivate->hoverHandler->m_row : -1;
7024 m_column = tableViewPrivate->resizableColumns ? tableViewPrivate->hoverHandler->m_column : -1;
7039 const qreal dragDist =
qSqrt(distX * distX + distY * distY);
7040 if (dragDist >
qApp->styleHints()->startDragDistance())
7059#if QT_CONFIG(cursor)
7071 tableView->setFiltersChildMouseEvents(
false);
7079#if QT_CONFIG(cursor)
7080 tableViewPrivate->updateCursor();
7092 tableView->setFiltersChildMouseEvents(
true);
7093#if QT_CONFIG(cursor)
7094 tableViewPrivate->updateCursor();
7102 auto initIndices = [](
auto& visualIndex,
auto& logicalIndex,
int size) {
7103 visualIndex.resize(
size);
7104 logicalIndex.resize(
size);
7132 return syncView->d_func()->logicalRowIndex(visualIndex);
7141 return syncView->d_func()->logicalColumnIndex(visualIndex);
7150 return syncView->d_func()->visualRowIndex(logicalIndex);
7152 return logicalIndex;
7159 return syncView->d_func()->visualColumnIndex(logicalIndex);
7161 return logicalIndex;
7182#include "moc_qquicktableview_p.cpp"
7183#include "moc_qquicktableview_p_p.cpp"
void rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow, QPrivateSignal)
void columnsRemoved(const QModelIndex &parent, int first, int last, QPrivateSignal)
This signal is emitted after columns have been removed from the model.
LayoutChangeHint
This enum describes the way the model changes layout.
virtual Q_INVOKABLE Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
void modelReset(QPrivateSignal)
void layoutChanged(const QList< QPersistentModelIndex > &parents=QList< QPersistentModelIndex >(), QAbstractItemModel::LayoutChangeHint hint=QAbstractItemModel::NoLayoutChangeHint)
void rowsInserted(const QModelIndex &parent, int first, int last, QPrivateSignal)
This signal is emitted after rows have been inserted into the model.
void columnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn, QPrivateSignal)
void columnsInserted(const QModelIndex &parent, int first, int last, QPrivateSignal)
This signal is emitted after columns have been inserted into the model.
virtual Q_INVOKABLE QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index.
void rowsRemoved(const QModelIndex &parent, int first, int last, QPrivateSignal)
This signal is emitted after rows have been removed from the model.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static QDir current()
Returns the application's current directory.
The QEventPoint class provides information about a point in a QPointerEvent.
QGraphicsWidget * window() const
QPointF mapFromItem(const QGraphicsItem *item, const QPointF &point) const
Maps the point point, which is in item's coordinate system, to this item's coordinate system,...
void setParentItem(QGraphicsItem *parent)
Sets this item's parent item to newParent.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
void setVisible(bool visible)
If visible is true, the item is made visible.
bool isAncestorOf(const QGraphicsItem *child) const
Returns true if this item is an ancestor of child (i.e., if this item is child's parent,...
static QObject * focusObject()
Returns the QObject in currently active window that will be final receiver of events tied to focus,...
key_iterator keyEnd() const noexcept
qsizetype size() const noexcept
Returns the number of items in the hash.
QList< T > values() const
Returns a list containing all the values in the hash, in an arbitrary order.
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
key_iterator keyBegin() const noexcept
T value(const Key &key) const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
This signal is emitted whenever the selection changes.
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
This signal is emitted whenever the current item changes.
Q_INVOKABLE bool isSelected(const QModelIndex &index) const
Returns true if the given model item index is selected.
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Sets the model item index to be the current item, and emits currentChanged().
virtual void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Selects the model item index using the specified command, and emits selectionChanged().
QAbstractItemModel * model
Q_CORE_EXPORT QModelIndexList indexes() const
Returns a list of model indexes that correspond to the selected items.
Q_CORE_EXPORT void merge(const QItemSelection &other, QItemSelectionModel::SelectionFlags command)
Merges the other selection with this QItemSelection using the command given.
The QJSValue class acts as a container for Qt/JavaScript data types.
bool isCallable() const
Returns true if this QJSValue is a function, otherwise returns false.
QJSValue call(const QJSValueList &args=QJSValueList()) const
Calls this QJSValue as a function, passing args as arguments to the function, and using the globalObj...
double toNumber() const
Returns the number value of this QJSValue, as defined in \l{ECMA-262} section 9.3,...
bool isUndefined() const
Returns true if this QJSValue is of the primitive type Undefined or if the managed value has been cle...
bool strictlyEquals(const QJSValue &other) const
Returns true if this QJSValue is equal to other using strict comparison (no conversion),...
The QKeyEvent class describes a key event.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
const_reference at(qsizetype i) const noexcept
constexpr int bottom() const noexcept
Returns the bottom margin.
constexpr int left() const noexcept
Returns the left margin.
constexpr int right() const noexcept
Returns the right margin.
constexpr int top() const noexcept
Returns the top margin.
std::pair< iterator, bool > insert(value_type &&v)
const Container & values() const &
bool contains(const value_type &v) const
void remove(const value_type &v)
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}.
QDynamicMetaObjectData * metaObject
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
void installEventFilter(QObject *filterObj)
Installs an event filter filterObj on this object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
virtual bool eventFilter(QObject *watched, QEvent *event)
Filters events if this object has been installed as an event filter for the watched object.
QVariant property(const char *name) const
Returns the value of the object's name property.
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
bool isValid() const
Returns {true} if this persistent model index is valid; otherwise returns {false}.
\inmodule QtCore\reentrant
constexpr qreal & ry() noexcept
Returns a reference to the y coordinate of this point.
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
constexpr qreal & rx() noexcept
Returns a reference to the x coordinate of this point.
\inmodule QtCore\reentrant
constexpr int & ry() noexcept
Returns a reference to the y coordinate of this point.
constexpr int & rx() noexcept
Returns a reference to the x coordinate of this point.
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
A base class for pointer events.
GrabTransition
This enum represents a transition of exclusive or passive grab from one object (possibly nullptr) to ...
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
The QQmlComponent class encapsulates a QML component definition.
static QQmlData * get(QObjectPrivate *priv, bool create)
IncubationMode
Specifies the mode the incubator operates in.
void createdItem(int index, QObject *object)
void modelUpdated(const QQmlChangeSet &changeSet, bool reset)
virtual const QAbstractItemModel * abstractItemModel() const
virtual QQmlIncubator::Status incubationStatus(int index)=0
void initItem(int index, QObject *object)
virtual ReleaseFlags release(QObject *object, ReusableFlag reusableFlag=NotReusable)=0
void drainReusableItemsPool(int maxPoolTime) override
bool canFetchMore() const
bool setRequiredProperty(int index, const QString &name, const QVariant &value) final
void setModel(const QVariant &model)
QQmlComponent * delegate() const
void useImportVersion(QTypeRevision version)
void setDelegate(QQmlComponent *)
void dispose(QObject *object)
ReleaseFlags release(QObject *object, ReusableFlag reusable=NotReusable) override
bool isRunning() const
\qmlproperty bool QtQuick::Animation::running This property holds whether the animation is currently ...
void complete()
\qmlmethod QtQuick::Animation::complete()
void restart()
\qmlmethod QtQuick::Animation::restart()
void stop()
\qmlmethod QtQuick::Animation::stop()
Qt::Orientations activeDirections() const
void clearFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions={ })
virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent)
void updateBeginningEnd()
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
virtual qreal minYExtent() const
void setContentWidth(qreal)
virtual void viewportMoved(Qt::Orientations orient)
bool isMoving() const
\qmlproperty bool QtQuick::Flickable::moving \qmlproperty bool QtQuick::Flickable::movingHorizontally...
virtual qreal maxXExtent() const
virtual qreal maxYExtent() const
virtual qreal minXExtent() const
void setContentHeight(qreal)
Qt::KeyboardModifiers modifiers
void handleEventPoint(QPointerEvent *ev, QEventPoint &point) override
QQuickAnchors * anchors() const
\qmlpropertygroup QtQuick::Item::anchors \qmlproperty AnchorLine QtQuick::Item::anchors....
QQuickDeliveryAgentPrivate * deliveryAgentPrivate()
QQmlListProperty< QQuickItem > children()
static QQuickItemPrivate * get(QQuickItem *item)
QPointer< QQuickItem > item
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual void keyPressEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key press events for an item.
Q_INVOKABLE QPointF mapToItem(const QQuickItem *item, const QPointF &point) const
Maps the given point in this item's coordinate system to the equivalent point within item's coordinat...
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
bool activeFocusOnTab() const
\qmlproperty bool QtQuick::Item::activeFocusOnTab
virtual Q_INVOKABLE bool contains(const QPointF &point) const
\qmlmethod bool QtQuick::Item::contains(point point)
qreal width
This property holds the width of this item.
QQuickItem * parentItem() const
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
qreal height
This property holds the height of this item.
bool enabled
\qmlproperty bool QtQuick::Item::enabled
QQuickItem * parentItem() const
\qmlproperty Item QtQuick::PointerHandler::parent
void setMargin(qreal pointDistanceThreshold)
virtual bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point)
Returns true if the given point (as part of event) could be relevant at all to this handler,...
void setPassiveGrab(QPointerEvent *event, const QEventPoint &point, bool grab=true)
Acquire or give up a passive grab of the given point, according to the grab state.
void setGrabPermissions(GrabPermissions grabPermissions)
void setEnabled(bool enabled)
@ CanTakeOverFromAnything
bool setExclusiveGrab(QPointerEvent *ev, const QEventPoint &point, bool grab=true)
Acquire or give up the exclusive grab of the given point, according to the grab state,...
void setTo(const QVariant &)
void setEasing(const QEasingCurve &)
void setTargetObject(QObject *)
virtual void setDuration(int)
void setProperty(const QString &)
@ SelectionRectangleChanged
void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override
Notification that the grab has changed in some way which is relevant to this handler.
void handleEventPoint(QPointerEvent *event, QEventPoint &point) override
QQuickTableViewHoverHandler(QQuickTableView *view)
bool isHoveringGrid() const
bool containsIndex(Qt::Edge edge, int index)
QPoint currentCell() const
QQmlIncubator::IncubationMode incubationMode() const
void begin(const QPoint &cell, const QPointF &pos, QQmlIncubator::IncubationMode incubationMode)
QPointF startPosition() const
bool hasCurrentCell() const
void updateSelectedOnAllDelegateItems()
bool canUnloadTableEdge(Qt::Edge tableEdge, const QRectF fillRect) const
std::function< void(CallBackFlag)> selectableCallbackFunction
QQuickTableView::SelectionBehavior selectionBehavior
bool editFromKeyEvent(QKeyEvent *e)
bool startSelection(const QPointF &pos, Qt::KeyboardModifiers modifiers) override
bool canLoadTableEdge(Qt::Edge tableEdge, const QRectF fillRect) const
void calculateTopLeft(QPoint &topLeft, QPointF &topLeftPos)
QQuickItem * selectionPointerHandlerTarget() const override
void drainReusePoolAfterLoadRequest()
QPoint cellAtModelIndex(int modelIndex) const
void releaseLoadedItems(QQmlTableInstanceModel::ReusableFlag reusableFlag)
void layoutVerticalEdge(Qt::Edge tableEdge)
void adjustViewportXAccordingToAlignment()
virtual void itemCreatedCallback(int modelIndex, QObject *object)
void setCurrentOnDelegateItem(const QModelIndex &index, bool isCurrent)
bool setCurrentIndexFromKeyEvent(QKeyEvent *e)
QList< SectionData > visualIndices[Qt::Vertical]
qreal getEffectiveRowHeight(int row) const
void syncLoadedTableFromLoadRequest()
void updateAverageRowHeight()
void rowsMovedCallback(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row)
void moveSection(int source, int destination, Qt::Orientations orientation)
void createWrapperModel()
virtual QVariant modelImpl() const
virtual void itemReusedCallback(int modelIndex, QObject *object)
FxTableItem * createFxTableItem(const QPoint &cell, QQmlIncubator::IncubationMode incubationMode)
void disconnectFromModel()
qreal cellHeight(const QPoint &cell) const
void layoutAfterLoadingInitialTable()
qreal cellWidth(const QPoint &cell) const
QQuickTableView::SelectionMode selectionMode
qreal getAlignmentContentX(int column, Qt::Alignment alignment, const qreal offset, const QRectF &subRect)
@ CalculateNewContentHeight
@ CalculateNewTopLeftColumn
@ CalculateNewContentWidth
void modelResetCallback()
void rowsRemovedCallback(const QModelIndex &parent, int begin, int end)
qreal getColumnWidth(int column) const
void scheduleRebuildIfFastFlick()
QSizeF scrollTowardsSelectionPoint(const QPointF &pos, const QSizeF &step) override
qreal getColumnLayoutWidth(int column)
void setSelectionEndPos(const QPointF &pos) override
Qt::Edge nextEdgeToUnload(const QRectF rect)
void initializeIndexMapping()
void forceLayout(bool immediate)
bool pointerNavigationEnabled
QJSValue rowHeightProvider
void releaseItem(FxTableItem *fxTableItem, QQmlTableInstanceModel::ReusableFlag reusableFlag)
void unloadItem(const QPoint &cell)
void selectionChangedInSelectionModel(const QItemSelection &selected, const QItemSelection &deselected)
virtual int logicalColumnIndex(const int visualIndex) const
int assignedPositionViewAtRowAfterRebuild
QRectF positionViewAtRowSubRect
QList< SectionData > logicalIndices[Qt::Vertical]
bool inSelectionModelUpdate
@ MovePreloadedItemsToPool
virtual void syncDelegate()
qreal positionViewAtRowOffset
virtual int logicalRowIndex(const int visualIndex) const
bool inSetLocalViewportPos
RebuildOptions scheduledRebuildOptions
QQmlNullableValue< qreal > explicitContentWidth
bool atTableEnd(Qt::Edge edge) const
~QQuickTableViewPrivate() override
void setSelectionStartPos(const QPointF &pos) override
QRectF loadedTableOuterRect
QRectF selectionRectangle() const override
QList< QPointer< QQuickTableView > > syncChildren
void scheduleRebuildTable(QQuickTableViewPrivate::RebuildOptions options)
QQuickTableView * rootSyncView() const
void currentChangedInSelectionModel(const QModelIndex ¤t, const QModelIndex &previous)
QQmlGuard< QQmlComponent > assignedDelegate
qreal getAlignmentContentY(int row, Qt::Alignment alignment, const qreal offset, const QRectF &subRect)
FxTableItem * loadedTableItem(const QPoint &cell) const
QQmlInstanceModel * model
QMargins edgesBeforeRebuild
int positionViewAtColumnAfterRebuild
bool selectedInSelectionModel(const QPoint &cell) const
void setCallback(std::function< void(CallBackFlag)> func) override
bool scrollToColumn(int column, Qt::Alignment alignment, qreal offset, const QRectF subRect=QRectF())
void layoutTableEdgeFromLoadRequest()
void positionViewAtRow(int row, Qt::Alignment alignment, qreal offset, const QRectF subRect=QRectF())
int nextVisibleEdgeIndex(Qt::Edge edge, int startIndex) const
QQuickTableViewHoverHandler * hoverHandler
virtual void modelUpdated(const QQmlChangeSet &changeSet, bool reset)
EdgeRange cachedNextVisibleEdgeIndex[4]
RebuildOptions rebuildOptions
static QQuickTableViewPrivate * get(QQuickTableView *q)
bool warnNoSelectionModel
void fixup(AxisData &data, qreal minExtent, qreal maxExtent) override
void clearEdgeSizeCache()
QTypeRevision resolveImportVersion()
virtual void syncWithPendingChanges()
bool compareModel(const QVariant &model1, const QVariant &model2) const
qreal getRowHeight(int row) const
void normalizeSelection() override
void updateContentHeight()
QItemSelectionModel::SelectionFlag selectionFlag
QJSValue columnWidthProvider
void layoutHorizontalEdge(Qt::Edge tableEdge)
bool isColumnHidden(int column) const
QRectF positionViewAtColumnSubRect
bool scrollToRow(int row, Qt::Alignment alignment, qreal offset, const QRectF subRect=QRectF())
QString tableLayoutToString() const
void loadEdge(Qt::Edge edge, QQmlIncubator::IncubationMode incubationMode)
bool keyNavigationEnabled
virtual void initItemCallback(int modelIndex, QObject *item)
bool inSyncViewportPosRecursive
EdgeRange cachedColumnWidth
bool cellIsValid(const QPoint &cell) const
virtual QAbstractItemModel * selectionSourceModel()
qreal sizeHintForRow(int row) const
virtual void updateSelection(const QRect &oldSelection, const QRect &newSelection)
QSize tableSizeBeforeRebuild
void updateContentWidth()
Qt::Alignment positionViewAtColumnAlignment
virtual void syncSyncView()
bool currentInSelectionModel(const QPoint &cell) const
qreal getEffectiveColumnX(int column) const
void clearSelection() override
QQuickTableView::EditTriggers editTriggers
void cancelSelectionTracking()
QPointer< QQuickTableView > assignedSyncView
Qt::Edge nextEdgeToLoad(const QRectF rect)
Qt::Orientations assignedSyncDirection
void processLoadRequest()
Qt::Alignment positionViewAtRowAlignment
QQmlTableInstanceModel * editModel
int edgeToArrayIndex(Qt::Edge edge) const
FxTableItem * loadFxTableItem(const QPoint &cell, QQmlIncubator::IncubationMode incubationMode)
QQmlNullableValue< qreal > explicitContentHeight
void updatePolish() override
void setLocalViewportX(qreal contentX)
TableEdgeLoadRequest loadRequest
RebuildOptions checkForVisibilityChanges()
void setCurrentIndexFromTap(const QPointF &pos)
QQmlTableInstanceModel::ReusableFlag reusableFlag
void layoutChangedCallback(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
bool isRowHidden(int row) const
void loadAndUnloadVisibleEdges(QQmlIncubator::IncubationMode incubationMode=QQmlIncubator::AsynchronousIfNested)
QRectF loadedTableInnerRect
QQuickPropertyAnimation positionXAnimation
virtual int visualRowIndex(const int logicalIndex) const
QMinimalFlatSet< int > loadedColumns
QHash< int, FxTableItem * > loadedItems
QAbstractItemModel * qaim(QVariant modelAsVariant) const
void setLocalViewportY(qreal contentY)
int modelIndexToCellIndex(const QModelIndex &modelIndex, bool visualIndex=true) const
void rowsInsertedCallback(const QModelIndex &parent, int begin, int end)
QMinimalFlatSet< int > loadedRows
void relayoutTableItems()
void setCurrentIndex(const QPoint &cell)
QQuickTableViewAttached * getAttachedObject(const QObject *object) const
bool blockItemCreatedCallback
qreal positionViewAtColumnOffset
virtual void setModelImpl(const QVariant &newModel)
QItemSelection existingSelection
void clearSection(Qt::Orientations orientation)
void updateCurrentRowAndColumn()
QPoint selectionStartCell
QSize calculateTableSize()
SectionState m_sectionState
qreal getEffectiveColumnWidth(int column) const
void unloadEdge(Qt::Edge edge)
void cancelOvershootAfterLayout()
void columnsRemovedCallback(const QModelIndex &parent, int begin, int end)
RebuildState rebuildState
qreal sizeHintForColumn(int column) const
void processRebuildTable()
int modelIndexAtCell(const QPoint &cell) const
QPointer< QItemSelectionModel > selectionModel
qreal getRowLayoutHeight(int row)
qreal getEffectiveRowY(int row) const
void shiftLoadedTableRect(const QPointF newPosition)
bool moveToNextRebuildState()
virtual int visualColumnIndex(const int logicalIndex) const
virtual void syncPositionView()
void adjustViewportYAccordingToAlignment()
int assignedPositionViewAtColumnAfterRebuild
int nextVisibleEdgeIndexAroundLoadedTable(Qt::Edge edge) const
QPoint clampedCellAtPos(const QPointF &pos) const
QPointer< QQmlTableInstanceModel > tableModel
QPointer< QQuickTableView > syncView
void syncRebuildOptions()
void setRequiredProperty(const char *property, const QVariant &value, int serializedModelIndex, QObject *object, bool init)
void updateAverageColumnWidth()
QQuickPropertyAnimation positionYAnimation
bool canEdit(const QModelIndex tappedIndex, bool warn)
void setSelectedOnDelegateItem(const QModelIndex &modelIndex, bool select)
int positionViewAtRowAfterRebuild
EdgeRange cachedRowHeight
void syncViewportPosRecursive()
void columnsInsertedCallback(const QModelIndex &parent, int begin, int end)
void syncLoadedTableRectFromLoadedTable()
virtual void itemPooledCallback(int modelIndex, QObject *object)
bool updateTableRecursive()
void handleTap(const QQuickHandlerPoint &point)
void positionViewAtColumn(int column, Qt::Alignment alignment, qreal offset, const QRectF subRect=QRectF())
QPersistentModelIndex editIndex
QQuickTableViewResizeHandler * resizeHandler
void columnsMovedCallback(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column)
void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *ev, QEventPoint &point) override
Notification that the grab has changed in some way which is relevant to this handler.
void updateState(QEventPoint &point)
void updateDrag(QPointerEvent *event, QEventPoint &point)
QQuickTableViewResizeHandler(QQuickTableView *view)
void handleEventPoint(QPointerEvent *event, QEventPoint &point) override
bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override
Returns true if the given point (as part of event) could be relevant at all to this handler,...
bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override
Returns true if the given point (as part of event) could be relevant at all to this handler,...
QQuickTableViewTapHandler(QQuickTableView *view)
void setReuseItems(bool reuseItems)
Q_INVOKABLE void positionViewAtIndex(const QModelIndex &index, PositionMode mode, const QPointF &offset=QPointF(), const QRectF &subRect=QRectF())
bool eventFilter(QObject *obj, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
bool keyNavigationEnabled
FINALSelectionBehavior selectionBehavior
void setSyncView(QQuickTableView *view)
FINALbool resizableColumns
Q_INVOKABLE void positionViewAtRow(int row, PositionMode mode, qreal offset=0, const QRectF &subRect=QRectF())
FINALSelectionMode selectionMode
void setSelectionBehavior(SelectionBehavior selectionBehavior)
void setResizableColumns(bool enabled)
QQuickTableView(QQuickItem *parent=nullptr)
void setSelectionModel(QItemSelectionModel *selectionModel)
void setAnimate(bool animate)
void setDelegate(QQmlComponent *)
Qt::Orientations syncDirection
void setAlternatingRows(bool alternatingRows)
~QQuickTableView() override
QItemSelectionModel * selectionModel
void setSelectionMode(SelectionMode selectionMode)
qreal minYExtent() const override
void setEditTriggers(EditTriggers editTriggers)
void setResizableRows(bool enabled)
void componentFinalized() override
The customization point provided by this interface.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setModel(const QVariant &newModel)
void setKeyNavigationEnabled(bool enabled)
Q_INVOKABLE void positionViewAtColumn(int column, PositionMode mode, qreal offset=0, const QRectF &subRect=QRectF())
QQuickTableView * syncView
void columnWidthProviderChanged()
FINALEditTriggers editTriggers
void viewportMoved(Qt::Orientations orientation) override
QJSValue rowHeightProvider
qreal maxYExtent() const override
qreal minXExtent() const override
void setRowHeightProvider(const QJSValue &provider)
void rowHeightProviderChanged()
Q_INVOKABLE void forceLayout()
bool pointerNavigationEnabled
Q_INVOKABLE QQuickItem * itemAtCell(const QPoint &cell) const
void setColumnWidthProvider(const QJSValue &provider)
Q_INVOKABLE void positionViewAtCell(const QPoint &cell, PositionMode mode, const QPointF &offset=QPointF(), const QRectF &subRect=QRectF())
void setRowSpacing(qreal spacing)
void setSyncDirection(Qt::Orientations direction)
qreal maxXExtent() const override
void setPointerNavigationEnabled(bool enabled)
void setColumnSpacing(qreal spacing)
void setContentHeight(qreal height)
FINALbool alternatingRows
void keyPressEvent(QKeyEvent *e) override
This event handler can be reimplemented in a subclass to receive key press events for an item.
void setContentWidth(qreal width)
void columnSpacingChanged()
QJSValue columnWidthProvider
static QQuickTableViewAttached * qmlAttachedProperties(QObject *)
void doubleTapped(QEventPoint eventPoint, Qt::MouseButton)
void singleTapped(QEventPoint eventPoint, Qt::MouseButton)
bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override
Returns true if the given point (as part of event) could be relevant at all to this handler,...
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
QObject * focusObject() const override
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr qreal bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr void moveRight(qreal pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's right edge at the given finite x coordinate...
constexpr void moveTopLeft(const QPointF &p) noexcept
Moves the rectangle, leaving the top-left corner at the given position.
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
bool intersects(const QRectF &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e.
constexpr void setWidth(qreal w) noexcept
Sets the width of the rectangle to the given finite width.
constexpr void moveBottom(qreal pos) noexcept
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given finite y coordinate.
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QPointF center() const noexcept
Returns the center point of the rectangle.
constexpr void moveLeft(qreal pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's left edge at the given finite x coordinate.
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void setHeight(qreal h) noexcept
Sets the height of the rectangle to the given finite height.
constexpr void moveTop(qreal pos) noexcept
Moves the rectangle vertically, leaving the rectangle's top line at the given finite y coordinate.
constexpr qreal right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
\inmodule QtCore\reentrant
QRect normalized() const noexcept
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.
constexpr qreal & rwidth() noexcept
Returns a reference to the width.
constexpr void setHeight(qreal h) noexcept
Sets the height to the given finite height.
constexpr qreal & rheight() noexcept
Returns a reference to the height.
constexpr void setWidth(qreal w) noexcept
Sets the width to the given finite width.
constexpr qreal width() const noexcept
Returns the width.
constexpr qreal height() const noexcept
Returns the height.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
static constexpr QTypeRevision zero()
Produces a QTypeRevision with major and minor version {0}.
qreal toReal(bool *ok=nullptr) const
Returns the variant as a qreal if the variant has userType() \l QMetaType::Double,...
float toFloat(bool *ok=nullptr) const
Returns the variant as a float if the variant has userType() \l QMetaType::Double,...
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QStringList toStringList() const
Returns the variant as a QStringList if the variant has userType() \l QMetaType::QStringList,...
EGLImageKHR int int EGLuint64KHR * modifiers
QSet< QString >::iterator it
object setObjectName("A new object name")
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char * destination
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
bool qIsNaN(qfloat16 f) noexcept
qfloat16 qSqrt(qfloat16 f)
QList< QJSValue > QJSValueList
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
static Q_DECL_CONST_FUNCTION bool qt_is_nan(double d)
static Q_DECL_CONST_FUNCTION bool qt_is_finite(double d)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLsizei GLchar * source
GLenum GLenum GLsizei void GLsizei void * column
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * row
QQmlContext * qmlContext(const QObject *obj)
QQuickItem * qmlobject_cast< QQuickItem * >(QObject *object)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QQuickAttachedPropertyPropagator * attachedObject(const QMetaObject *type, QObject *object, bool create=false)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
static const Qt::Edge allTableEdges[]
#define TV_REBUILDOPTION(OPTION)
static const char * kRequiredProperties
#define Q_TABLEVIEW_ASSERT(cond, output)
#define Q_TABLEVIEW_UNREACHABLE(output)
\qmltype TableView \inqmlmodule QtQuick
#define TV_REBUILDSTATE(STATE)
static const char * kRequiredProperty_selected
QDebug operator<<(QDebug dbg, QQuickTableViewPrivate::RebuildState state)
static const char * kRequiredProperty_editing
static const char * kRequiredProperty_current
static const qreal kDefaultColumnWidth
static const int kEdgeIndexAtEnd
static QT_BEGIN_NAMESPACE const qreal kDefaultRowHeight
static const int kEdgeIndexNotSet
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, JSToQVariantConversionBehavior conversionBehavior, V4ObjectSet *visitedObjects)
std::uniform_real_distribution dist(1, 2.5)
[2]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
myObject disconnect()
[26]
selection select(topLeft, bottomRight)