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>
1453#define Q_TABLEVIEW_UNREACHABLE(output) { dumpTable(); qWarning() << "output:" << output; Q_UNREACHABLE(); }
1454#define Q_TABLEVIEW_ASSERT(cond, output) Q_ASSERT((cond) || [&](){ dumpTable(); qWarning() << "output:" << output; return false;}())
1465#define TV_REBUILDSTATE(STATE) \
1466 case QQuickTableViewPrivate::RebuildState::STATE: \
1467 dbg << QStringLiteral(#STATE); break;
1487#define TV_REBUILDOPTION(OPTION) \
1488 if (options & QQuickTableViewPrivate::RebuildOption::OPTION) \
1489 dbg << QStringLiteral(#OPTION)
1523 return index <= startIndex;
1526 return index >= startIndex;
1530 const int s = std::min(startIndex, endIndex);
1531 const int e = std::max(startIndex, endIndex);
1553 if (
auto item = fxTableItem->item) {
1554 if (fxTableItem->ownItem)
1570 return QString(
QLatin1String(
"table cells: (%1,%2) -> (%3,%4), item count: %5, table rect: %6,%7 x %8,%9"))
1583 std::stable_sort(listCopy.begin(), listCopy.end(),
1585 { return lhs->index < rhs->index; });
1588 for (
int i = 0;
i < listCopy.size(); ++
i)
1604 if (!tableInstanceModel) {
1617 bool wasRequired =
false;
1632 if (propertyList.contains(propertyName)) {
1633 const auto metaObject =
object->metaObject();
1635 const auto metaProperty =
metaObject->property(propertyIndex);
1636 metaProperty.write(
object,
value);
1649 if (propertyList.contains(propertyName)) {
1652 const auto metaProperty =
metaObject->property(propertyIndex);
1671 qmlWarning(q_func()) <<
"Cannot start selection: no SelectionModel assigned!";
1677 qmlWarning(
q) <<
"Cannot start selection: TableView.selectionBehavior == TableView.SelectionDisabled";
1699 const QModelIndex startIndex =
q->index(startCell.y(), startCell.x());
1718 qmlWarning(q_func()) <<
"Cannot set selection: no SelectionModel assigned!";
1734 if (
pos.x() == -1) {
1775 qmlWarning(q_func()) <<
"Cannot set selection: no SelectionModel assigned!";
1836 return q->cellAtPosition(clampedPos,
true);
1851 const QModelIndex endIndex =
qaim->
index(newRect.y() + newRect.height(), newRect.x() + newRect.width());
1856 if (oldRect.x() < newRect.x()) {
1860 }
else if (oldRect.x() + oldRect.width() > newRect.x() + newRect.width()) {
1862 const QModelIndex endIndex =
qaim->
index(oldRect.y() + oldRect.height(), oldRect.x() + oldRect.width());
1866 if (oldRect.y() < newRect.y()) {
1870 }
else if (oldRect.y() + oldRect.height() > newRect.y() + newRect.height()) {
1872 const QModelIndex endIndex =
qaim->
index(oldRect.y() + oldRect.height(), oldRect.x() + oldRect.width());
1928 if (bottomRightCell.x() < topLeftCell.x())
1929 std::swap(topLeftCell.rx(), bottomRightCell.rx());
1931 std::swap(topLeftCell.ry(), bottomRightCell.ry());
1952 left =
q->contentWidth();
1957 top =
q->contentHeight();
1962 right =
q->contentWidth();
2001 if (remainingDist > 0 || !firstColumnLoaded) {
2003 if (firstColumnLoaded)
2004 stepX =
qMin(stepX, remainingDist);
2005 q->setContentX(
q->contentX() - stepX);
2008 }
else if (outsideRight) {
2011 if (remainingDist > 0 || !lastColumnLoaded) {
2013 if (lastColumnLoaded)
2014 stepX =
qMin(stepX, remainingDist);
2015 q->setContentX(
q->contentX() + stepX);
2023 if (remainingDist > 0 || !firstRowLoaded) {
2026 stepY =
qMin(stepY, remainingDist);
2027 q->setContentY(
q->contentY() - stepY);
2030 }
else if (outsideBottom) {
2033 if (remainingDist > 0 || !lastRowLoaded) {
2036 stepY =
qMin(stepY, remainingDist);
2037 q->setContentY(
q->contentY() + stepY);
2063 return (cell.
y() * availableColumns) + cell.
x();
2066 return (cell.
x() * availableRows) + cell.
y();
2077 int row = int(modelIndex / availableColumns);
2078 int column = modelIndex % availableColumns;
2082 int column = int(modelIndex / availableRows);
2083 int row = modelIndex % availableRows;
2092 const QPoint cell = q_func()->cellAtIndex(modelIndex);
2100 return int(
log2(
float(edge)));
2116 int startIndex = -1;
2134 if (cachedResult.containsIndex(edge, startIndex))
2140 int testIndex = startIndex;
2145 if (testIndex < 0) {
2151 foundIndex = testIndex;
2166 foundIndex = testIndex;
2175 if (testIndex < 0) {
2181 foundIndex = testIndex;
2196 foundIndex = testIndex;
2205 cachedResult.startIndex = startIndex;
2206 cachedResult.endIndex = foundIndex;
2240 q->QQuickFlickable::setContentWidth(0);
2248 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2252 q->QQuickFlickable::setContentWidth(estimatedWidth);
2276 q->QQuickFlickable::setContentHeight(0);
2284 const qreal estimatedRemainingHeight = remainingRowHeights + remainingSpacing;
2288 q->QQuickFlickable::setContentHeight(estimatedHeight);
2306 bool tableMovedHorizontally =
false;
2307 bool tableMovedVertically =
false;
2315 const auto syncView_d =
syncView->d_func();
2316 origin.
rx() = syncView_d->origin.x();
2331 tableMovedHorizontally =
true;
2340 const int columnsRemaining = nextLeftColumn + 1;
2343 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2359 tableMovedHorizontally =
true;
2368 const int columnsRemaining =
tableSize.
width() - nextRightColumn;
2371 const qreal estimatedRemainingWidth = remainingColumnWidths + remainingSpacing;
2373 endExtent.
rwidth() = pixelsOutsideContentWidth + estimatedRemainingWidth;
2378 const auto syncView_d =
syncView->d_func();
2379 origin.
ry() = syncView_d->origin.y();
2394 tableMovedVertically =
true;
2403 const int rowsRemaining = nextTopRow + 1;
2406 const qreal estimatedRemainingHeight = remainingRowHeights + remainingSpacing;
2422 tableMovedVertically =
true;
2434 const qreal estimatedRemainingHeight = remainingRowHeigts + remainingSpacing;
2436 endExtent.
rheight() = pixelsOutsideContentHeight + estimatedRemainingHeight;
2440 if (tableMovedHorizontally || tableMovedVertically) {
2449 auto syncChild_d = syncChild->d_func();
2451 if (tableMovedHorizontally)
2453 if (tableMovedVertically)
2537 if (wasVisibleFromBefore == isVisibleNow)
2542 qCDebug(lcTableViewDelegateLifecycle) <<
"Column" <<
column <<
"changed visibility to" << isVisibleNow;
2566 if (wasVisibleFromBefore == isVisibleNow)
2571 qCDebug(lcTableViewDelegateLifecycle) <<
"Row" <<
row <<
"changed visibility to" << isVisibleNow;
2609 const bool updated = rootView->d_func()->updateTableRecursive();
2611 qWarning() <<
"TableView::forceLayout(): Cannot do an immediate re-layout during an ongoing layout!";
2649 bool ownItem =
false;
2660 qWarning() <<
"TableView: failed loading index:" << modelIndex;
2669 qWarning() <<
"TableView: delegate is not an item:" << modelIndex;
2676 qmlWarning(
item) <<
"TableView: detected anchors on delegate with index: " << modelIndex
2677 <<
". Use implicitWidth and implicitHeight instead.";
2691 fxTableItem->setVisible(
false);
2692 fxTableItem->cell = cell;
2693 fxTableItem->index = modelIndex;
2702 static const bool forcedAsync = forcedIncubationMode ==
QLatin1String(
"async");
2711 qCDebug(lcTableViewDelegateLifecycle) << cell <<
"ready?" << bool(
item);
2729 auto item = fxTableItem->item;
2731 if (fxTableItem->ownItem) {
2737 fxTableItem->setVisible(
false);
2766 switch (tableEdge) {
2786 switch (tableEdge) {
2870 qreal columnWidth = 0;
2880 qreal rowHeight = 0;
2905 if (explicitColumnWidth >= 0)
2906 return explicitColumnWidth;
2920 if (
qIsNaN(columnWidth) || columnWidth <= 0) {
2923 qmlWarning(q_func()) <<
"the delegate's implicitWidth needs to be greater than zero";
2967 if (explicitRowHeight >= 0)
2968 return explicitRowHeight;
2972 return syncView->d_func()->getRowLayoutHeight(
row);
2982 if (
qIsNaN(rowHeight) || rowHeight <= 0) {
2985 qmlWarning(q_func()) <<
"the delegate's implicitHeight needs to be greater than zero";
3001 const int noExplicitColumnWidth = -1;
3013 qreal explicitColumnWidth =
q->explicitColumnWidth(
column);
3014 if (explicitColumnWidth >= 0)
3015 return explicitColumnWidth;
3016 return noExplicitColumnWidth;
3019 qreal columnWidth = noExplicitColumnWidth;
3024 if (
qIsNaN(columnWidth) || columnWidth < 0)
3025 columnWidth = noExplicitColumnWidth;
3029 qmlWarning(q_func()) <<
"columnWidthProvider doesn't contain a function";
3031 columnWidth = noExplicitColumnWidth;
3047 const int noExplicitRowHeight = -1;
3059 qreal explicitRowHeight =
q->explicitRowHeight(
row);
3060 if (explicitRowHeight >= 0)
3061 return explicitRowHeight;
3062 return noExplicitRowHeight;
3065 qreal rowHeight = noExplicitRowHeight;
3070 if (
qIsNaN(rowHeight) || rowHeight < 0)
3071 rowHeight = noExplicitRowHeight;
3075 qmlWarning(q_func()) <<
"rowHeightProvider doesn't contain a function";
3077 rowHeight = noExplicitRowHeight;
3092 if (subRect.isValid()) {
3100 contentX = columnX + subRect.x() +
offset;
3105 contentX = columnX + subRect.x() - centerDistance +
offset;
3113 contentX = columnX +
offset;
3118 contentX = columnX - centerDistance +
offset;
3123 contentX =
qBound(-
q->minXExtent(), contentX, -
q->maxXExtent());
3135 if (subRect.isValid()) {
3143 contentY = rowY + subRect.y() +
offset;
3148 contentY = rowY + subRect.y() - centerDistance +
offset;
3156 contentY = rowY +
offset;
3161 contentY = rowY - centerDistance +
offset;
3166 contentY =
qBound(-
q->minYExtent(), contentY, -
q->maxYExtent());
3187 qCDebug(lcTableViewDelegateLifecycle);
3191 qCDebug(lcTableViewDelegateLifecycle()) <<
"Skipping relayout, viewport has zero size";
3207 item->setGeometry(geometry);
3223 item->setGeometry(geometry);
3230 if (
Q_UNLIKELY(lcTableViewDelegateLifecycle().isDebugEnabled())) {
3242 int columnThatNeedsLayout;
3243 int neighbourColumn;
3252 columnX = neighbourItem->geometry().left() -
cellSpacing.
width() - columnWidth;
3264 const qreal rowY = neighbourItem->geometry().y();
3265 const qreal rowHeight = neighbourItem->geometry().height();
3267 fxTableItem->setGeometry(
QRectF(columnX, rowY, columnWidth, rowHeight));
3268 fxTableItem->setVisible(
true);
3270 qCDebug(lcTableViewDelegateLifecycle()) <<
"layout item:" <<
QPoint(columnThatNeedsLayout,
row) << fxTableItem->geometry();
3276 int rowThatNeedsLayout;
3280 rowThatNeedsLayout =
topRow();
3292 const qreal columnX = neighbourItem->geometry().x();
3293 const qreal columnWidth = neighbourItem->geometry().width();
3294 fxTableItem->item->setX(columnX);
3295 fxTableItem->item->setWidth(columnWidth);
3312 fxTableItem->item->setY(rowY);
3313 fxTableItem->item->setHeight(rowHeight);
3314 fxTableItem->setVisible(
true);
3316 qCDebug(lcTableViewDelegateLifecycle()) <<
"layout item:" <<
QPoint(
column, rowThatNeedsLayout) << fxTableItem->geometry();
3324 auto item = topLeftItem->item;
3329 qCDebug(lcTableViewDelegateLifecycle) <<
"geometry:" << topLeftItem->geometry();
3371 qCDebug(lcTableViewDelegateLifecycle()) <<
"all items loaded!";
3385 emit q->leftColumnChanged();
3388 emit q->rightColumnChanged();
3391 emit q->topRowChanged();
3394 emit q->bottomRowChanged();
3401 emit q->layoutChanged();
3407 qCDebug(lcTableViewDelegateLifecycle()) <<
"Load request completed!";
3408 qCDebug(lcTableViewDelegateLifecycle()) <<
"****************************************";
3419 :
QMargins(
q->leftColumn(),
q->topRow(),
q->rightColumn(),
q->bottomRow());
3432 qCDebug(lcTableViewDelegateLifecycle()) <<
"no items loaded!";
3487 emit q->columnsChanged();
3489 emit q->rowsChanged();
3491 emit q->leftColumnChanged();
3493 emit q->rightColumnChanged();
3495 emit q->topRowChanged();
3497 emit q->bottomRowChanged();
3503 emit q->layoutChanged();
3506 qCDebug(lcTableViewDelegateLifecycle()) <<
"rebuild completed!";
3507 qCDebug(lcTableViewDelegateLifecycle()) <<
"################################################";
3508 qCDebug(lcTableViewDelegateLifecycle());
3542 const auto syncView_d =
syncView->d_func();
3544 if (syncView_d->loadedItems.isEmpty()) {
3545 topLeftCell.rx() = 0;
3546 topLeftCell.ry() = 0;
3551 const QPoint syncViewTopLeftCell(syncView_d->leftColumn(), syncView_d->topRow());
3552 const auto syncViewTopLeftFxItem = syncView_d->loadedTableItem(syncViewTopLeftCell);
3553 const QPointF syncViewTopLeftPos = syncViewTopLeftFxItem->geometry().topLeft();
3556 topLeftCell.
rx() = syncViewTopLeftCell.x();
3557 topLeftPos.rx() = syncViewTopLeftPos.x();
3567 topLeftCell.ry() = syncViewTopLeftCell.y();
3568 topLeftPos.ry() = syncViewTopLeftPos.y();
3657 qCDebug(lcTableViewDelegateLifecycle()) <<
"initial top left cell:" << topLeft <<
", pos:" << topLeftPos;
3695 qCDebug(lcTableViewDelegateLifecycle()) <<
"no model found, leaving table empty";
3700 qCDebug(lcTableViewDelegateLifecycle()) <<
"empty model found, leaving table empty";
3705 qCDebug(lcTableViewDelegateLifecycle()) <<
"no delegate found, leaving table empty";
3710 qCDebug(lcTableViewDelegateLifecycle()) <<
"no visible row or column found, leaving table empty";
3715 qCDebug(lcTableViewDelegateLifecycle()) <<
"could not resolve top-left item, leaving table empty";
3720 qCDebug(lcTableViewDelegateLifecycle()) <<
"viewport has zero size, leaving table empty";
3808 const bool cancelVertically = positionVertically && !
syncVertically;
3811 if (cancelHorizontally && !
qFuzzyIsNull(
q->horizontalOvershoot())) {
3812 qCDebug(lcTableViewDelegateLifecycle()) <<
"cancelling overshoot horizontally:" <<
q->horizontalOvershoot();
3817 if (cancelVertically && !
qFuzzyIsNull(
q->verticalOvershoot())) {
3818 qCDebug(lcTableViewDelegateLifecycle()) <<
"cancelling overshoot vertically:" <<
q->verticalOvershoot();
3827 qCDebug(lcTableViewDelegateLifecycle) << edge;
3837 emit q->leftColumnChanged();
3846 emit q->rightColumnChanged();
3855 emit q->topRowChanged();
3864 emit q->bottomRowChanged();
3869 emit q->layoutChanged();
3877 qCDebug(lcTableViewDelegateLifecycle) << edge << edgeIndex << q_func();
3913 tableModified =
false;
3916 tableModified =
true;
3921 tableModified =
true;
3926 }
while (tableModified);
3969 const int minTime = int(std::ceil(
w >
h ?
qreal(
w + 1) /
h :
qreal(
h + 1) /
w));
3970 const int maxTime = minTime * 2;
3975 if (!q_func()->isComponentComplete()) {
4013 if (!updateComplete)
4018 auto syncChild_d = syncChild->d_func();
4026 const bool descendantUpdateComplete = syncChild_d->updateTableRecursive();
4027 if (!descendantUpdateComplete)
4099 const auto cppMetaObject =
data->propertyCache->firstCppMetaObject();
4103 return qmlTypeView.metaObjectRevision();
4152 const auto &selectedIndexes = selected.
indexes();
4153 const auto &deselectedIndexes = deselected.indexes();
4154 for (
int i = 0;
i < selectedIndexes.size(); ++
i)
4156 for (
int i = 0;
i < deselectedIndexes.size(); ++
i)
4164 <<
"Cannot select cells: TableView.selectionModel.model is not "
4165 <<
"compatible with the model displayed in the view";
4198 if (modelAsVariant.userType() == qMetaTypeId<QJSValue>())
4200 return qvariant_cast<QAbstractItemModel *>(modelAsVariant);
4208 const int cellIndex = *
it;
4213 const bool editing =
editIndex == q_func()->modelIndex(cell);
4224 <<
"Cannot change current index: TableView.selectionModel.model is not "
4225 <<
"compatible with the model displayed in the view";
4239 const QPoint currentCell =
q->cellAtIndex(currentIndex);
4242 emit q->currentColumnChanged();
4247 emit q->currentRowChanged();
4267 qCDebug(lcTableViewDelegateLifecycle) <<
"item done loading:"
4298 attached->setView(
q);
4306 emit attached->pooled();
4318 if (
auto item = qobject_cast<QQuickItem*>(
object))
4322 emit attached->reused();
4392 emit q_func()->modelChanged();
4407 if (effectiveModelVariant.userType() == qMetaTypeId<QJSValue>())
4410 const auto instanceModel = qobject_cast<QQmlInstanceModel *>(qvariant_cast<QObject*>(effectiveModelVariant));
4412 if (instanceModel) {
4417 model = instanceModel;
4433 syncView->d_func()->syncChildren.removeOne(
q);
4442 qmlWarning(
q) <<
"TableView: recursive syncView connection detected!";
4496 const auto syncView_d =
syncView->d_func();
4497 if (!syncView_d->loadedItems.isEmpty()) {
4675 return (model1 == model2 ||
4676 (model1.userType() == qMetaTypeId<QJSValue>() && model2.userType() == qMetaTypeId<QJSValue>() &&
4749 const qreal diffY =
qAbs(newContentY -
q->contentY());
4750 const qreal duration =
qBound(700., diffY * 5, 1500.);
4756 q->setContentY(newContentY);
4791 const qreal diffX =
qAbs(newContentX -
q->contentX());
4792 const qreal duration =
qBound(700., diffX * 5, 1500.);
4798 q->setContentX(newContentX);
4839 q->setContentX(contentX);
4853 q->setContentY(contentY);
4870 auto syncChild_d = syncChild->d_func();
4871 if (syncChild_d->syncHorizontally)
4872 w =
qMax(
w, syncChild->width());
4873 if (syncChild_d->syncHorizontally)
4874 h =
qMax(
h, syncChild->height());
4885 q->setActiveFocusOnTab(
true);
4909 if (!tapHandler->isPressed())
4915 if (!
q->isInteractive())
4920 if (
q->isInteractive())
4928 if (resizeRow || resizeColumn) {
4934 const QPointF pos = tapHandler->point().pressPosition();
4960 bool tappedCellIsSelected =
false;
4965 if (
canEdit(tappedIndex,
false)) {
4969 q->edit(tappedIndex);
4972 q->edit(tappedIndex);
4995 if (!tappedIndex.isValid()) {
4997 qmlWarning(
q) <<
"cannot edit: index is not valid!";
5004 qmlWarning(
q) <<
"cannot edit: QAbstractItemModel::flags(index) doesn't contain Qt::ItemIsEditable";
5009 const QPoint cell =
q->cellAtIndex(tappedIndex);
5013 qmlWarning(
q) <<
"cannot edit: the cell to edit is not inside the viewport!";
5018 if (!attached || !attached->editDelegate()) {
5020 qmlWarning(
q) <<
"cannot edit: no TableView.editDelegate set!";
5033 auto syncView_d =
syncView->d_func();
5034 if (!syncView_d->inSyncViewportPosRecursive) {
5036 syncView_d->setLocalViewportX(
q->contentX());
5038 syncView_d->setLocalViewportY(
q->contentY());
5039 syncView_d->syncViewportPosRecursive();
5044 auto syncChild_d = syncChild->d_func();
5045 if (!syncChild_d->inSyncViewportPosRecursive) {
5046 if (syncChild_d->syncHorizontally)
5047 syncChild_d->setLocalViewportX(
q->contentX());
5048 if (syncChild_d->syncVertically)
5049 syncChild_d->setLocalViewportY(
q->contentY());
5050 syncChild_d->syncViewportPosRecursive();
5071 const auto index = q_func()->modelIndex(cell);
5083 const QPoint currentCell =
q->cellAtIndex(currentIndex);
5085 if (!
q->activeFocusOnTab()) {
5114 auto beginMoveCurrentIndex = [&](){
5117 if (!shouldSelect) {
5120 }
else if (startNewSelection) {
5136 auto endMoveCurrentIndex = [&](
const QPoint &cell){
5154 beginMoveCurrentIndex();
5160 endMoveCurrentIndex({currentCell.
x(), nextRow});
5163 beginMoveCurrentIndex();
5169 endMoveCurrentIndex({currentCell.
x(), nextRow});
5172 beginMoveCurrentIndex();
5178 endMoveCurrentIndex({nextColumn, currentCell.
y()});
5181 beginMoveCurrentIndex();
5187 endMoveCurrentIndex({nextColumn, currentCell.
y()});
5190 int newBottomRow = -1;
5191 beginMoveCurrentIndex();
5204 endMoveCurrentIndex(
QPoint(currentCell.
x(), newBottomRow));
5208 beginMoveCurrentIndex();
5209 if (currentCell.
y() >
topRow()) {
5221 endMoveCurrentIndex(
QPoint(currentCell.
x(), newTopRow));
5224 beginMoveCurrentIndex();
5227 endMoveCurrentIndex(
QPoint(firstColumn, currentCell.
y()));
5230 beginMoveCurrentIndex();
5233 endMoveCurrentIndex(
QPoint(lastColumn, currentCell.
y()));
5236 beginMoveCurrentIndex();
5237 int nextRow = currentCell.
y();
5250 marginX =
q->leftMargin();
5252 marginX = -
q->leftMargin();
5255 endMoveCurrentIndex({nextColumn, nextRow});
5258 beginMoveCurrentIndex();
5259 int nextRow = currentCell.
y();
5272 marginX =
q->leftMargin();
5274 marginX = -
q->leftMargin();
5277 endMoveCurrentIndex({nextColumn, nextRow});
5302 if (!attached || !attached->editDelegate())
5305 bool anyKeyPressed =
false;
5306 bool editKeyPressed =
false;
5314 anyKeyPressed =
true;
5315 editKeyPressed =
true;
5325 anyKeyPressed =
true;
5331 if (!(editKeyAccepted || anyKeyAccepted))
5352#if QT_CONFIG(cursor)
5353void QQuickTableViewPrivate::updateCursor()
5377 qApp->changeOverrideCursor(shape);
5379 qApp->setOverrideCursor(shape);
5382 }
else if (m_cursorSet) {
5383 qApp->restoreOverrideCursor();
5384 m_cursorSet =
false;
5397 auto cellItem =
q->itemAtCell(cell);
5430 auto syncView_d =
d->syncView->d_func();
5431 syncView_d->syncChildren.removeOne(
this);
5451 qCDebug(lcTableViewDelegateLifecycle);
5477 return d_func()->tableSize.height();
5482 return d_func()->tableSize.width();
5487 return d_func()->cellSpacing.height();
5506 return d_func()->cellSpacing.width();
5525 return d_func()->rowHeightProvider;
5534 d->rowHeightProvider = provider;
5542 return d_func()->columnWidthProvider;
5551 d->columnWidthProvider = provider;
5559 return d_func()->modelImpl();
5565 if (
d->compareModel(newModel,
d->assignedModel))
5569 d->setModelImpl(newModel);
5570 if (
d->selectionModel)
5571 d->selectionModel->setModel(
d->selectionSourceModel());
5576 return d_func()->assignedDelegate;
5582 if (newDelegate ==
d->assignedDelegate)
5585 d->assignedDelegate = newDelegate;
5593 return d_func()->editTriggers;
5604 emit editTriggersChanged();
5620 if (!reuse &&
d->tableModel) {
5623 d->tableModel->drainReusableItemsPool(0);
5632 d->explicitContentWidth =
width;
5639 d->explicitContentHeight =
height;
5662 return d_func()->assignedSyncView;
5668 if (
d->assignedSyncView ==
view)
5671 d->assignedSyncView =
view;
5674 emit syncViewChanged();
5697 return d_func()->assignedSyncDirection;
5707 if (
d->assignedSyncView)
5710 emit syncDirectionChanged();
5715 return d_func()->selectionModel;
5728 if (
d->selectionModel) {
5737 if (
d->selectionModel) {
5738 d->selectionModel->setModel(
d->selectionSourceModel());
5745 d->updateSelectedOnAllDelegateItems();
5747 emit selectionModelChanged();
5752 return d_func()->animate;
5763 d->positionXAnimation.stop();
5764 d->positionYAnimation.stop();
5767 emit animateChanged();
5772 return d_func()->keyNavigationEnabled;
5778 if (
d->keyNavigationEnabled ==
enabled)
5783 emit keyNavigationEnabledChanged();
5788 return d_func()->pointerNavigationEnabled;
5794 if (
d->pointerNavigationEnabled ==
enabled)
5797 d->pointerNavigationEnabled =
enabled;
5799 emit pointerNavigationEnabledChanged();
5805 return d->loadedItems.isEmpty() ? -1 : d_func()->leftColumn();
5811 return d->loadedItems.isEmpty() ? -1 : d_func()->rightColumn();
5817 return d->loadedItems.isEmpty() ? -1 : d_func()->topRow();
5823 return d->loadedItems.isEmpty() ? -1 : d_func()->bottomRow();
5828 return d_func()->currentRow;
5833 return d_func()->currentColumn;
5839 if (row < 0 || row >=
rows() ||
d->loadedRows.isEmpty())
5848 d->positionViewAtRow(
row, Qt::Alignment(
int(
mode)),
offset, subRect);
5855 if (!subRect.isValid()) {
5858 const qreal subRectTop =
d->loadedTableOuterRect.top() + subRect.top();
5859 const qreal subRectBottom =
d->loadedTableOuterRect.top() + subRect.bottom();
5860 if (subRectTop < d->viewportRect.y())
5862 else if (subRectBottom >
d->viewportRect.bottom())
5866 if (!subRect.isValid()) {
5871 const qreal subRectBottom =
d->loadedTableInnerRect.bottom() + subRect.bottom();
5872 if (subRectBottom >
d->viewportRect.bottom())
5881 }
else if (subRect.isValid()) {
5883 const qreal subRectTop =
d->loadedTableOuterRect.top() + subRect.top();
5884 const qreal subRectBottom =
d->loadedTableOuterRect.top() + subRect.bottom();
5885 if (subRectBottom < d->viewportRect.top())
5887 else if (subRectTop >
d->viewportRect.bottom())
5892 const qreal subRectTop =
d->loadedTableInnerRect.bottom() + subRect.top();
5893 if (subRectTop >
d->viewportRect.bottom())
5905 if (column < 0 || column >=
columns() ||
d->loadedColumns.isEmpty())
5921 if (!subRect.isValid()) {
5924 const qreal subRectLeft =
d->loadedTableOuterRect.left() + subRect.left();
5925 const qreal subRectRight =
d->loadedTableOuterRect.left() + subRect.right();
5926 if (subRectLeft < d->viewportRect.left())
5928 else if (subRectRight >
d->viewportRect.right())
5932 if (!subRect.isValid()) {
5937 const qreal subRectRight =
d->loadedTableInnerRect.right() + subRect.right();
5938 if (subRectRight >
d->viewportRect.right())
5947 }
else if (subRect.isValid()) {
5949 const qreal subRectLeft =
d->loadedTableOuterRect.left() + subRect.left();
5950 const qreal subRectRight =
d->loadedTableOuterRect.left() + subRect.right();
5951 if (subRectRight < d->viewportRect.left())
5953 else if (subRectLeft >
d->viewportRect.right())
5958 const qreal subRectLeft =
d->loadedTableInnerRect.right() + subRect.left();
5959 if (subRectLeft >
d->viewportRect.right())
5972 if (!horizontalMode && !verticalMode) {
5987 if (!horizontalMode && !verticalMode) {
5998#if QT_DEPRECATED_SINCE(6, 5)
6003 if (!horizontalMode && !verticalMode) {
6018 const int modelIndex =
d->modelIndexAtCell(cell);
6019 if (!
d->loadedItems.contains(modelIndex))
6021 return d->loadedItems.value(modelIndex)->item;
6024#if QT_DEPRECATED_SINCE(6, 5)
6034 const int serializedIndex =
d->modelIndexToCellIndex(
index);
6035 if (!
d->loadedItems.contains(serializedIndex))
6037 return d->loadedItems.value(serializedIndex)->item;
6040#if QT_DEPRECATED_SINCE(6, 4)
6061 if (!
d->loadedTableOuterRect.contains(
position))
6064 const qreal hSpace =
d->cellSpacing.width();
6065 const qreal vSpace =
d->cellSpacing.height();
6066 qreal currentColumnEnd =
d->loadedTableOuterRect.x();
6067 qreal currentRowEnd =
d->loadedTableOuterRect.y();
6069 int foundColumn = -1;
6072 for (
const int column :
d->loadedColumns) {
6073 currentColumnEnd +=
d->getEffectiveColumnWidth(
column);
6078 currentColumnEnd += hSpace;
6088 for (
const int row :
d->loadedRows) {
6089 currentRowEnd +=
d->getEffectiveRowHeight(
row);
6094 currentRowEnd += vSpace;
6105 return QPoint(foundColumn, foundRow);
6108bool QQuickTableView::isColumnLoaded(
int column)
const
6111 if (!
d->loadedColumns.contains(
column))
6124bool QQuickTableView::isRowLoaded(
int row)
const
6127 if (!
d->loadedRows.contains(
row))
6140qreal QQuickTableView::columnWidth(
int column)
const
6143 if (!isColumnLoaded(
column))
6146 return d->getEffectiveColumnWidth(
column);
6149qreal QQuickTableView::rowHeight(
int row)
const
6152 if (!isRowLoaded(
row))
6155 return d->getEffectiveRowHeight(
row);
6158qreal QQuickTableView::implicitColumnWidth(
int column)
const
6161 if (!isColumnLoaded(
column))
6164 return d->sizeHintForColumn(
column);
6167qreal QQuickTableView::implicitRowHeight(
int row)
const
6170 if (!isRowLoaded(
row))
6173 return d->sizeHintForRow(
row);
6180 qmlWarning(
this) <<
"column must be greather than, or equal to, zero";
6184 if (
d->syncHorizontally) {
6193 d->explicitColumnWidths.remove(
column);
6197 if (
d->loadedItems.isEmpty())
6202 d->forceLayout(
false);
6205void QQuickTableView::clearColumnWidths()
6209 if (
d->syncHorizontally) {
6210 d->syncView->clearColumnWidths();
6214 if (
d->explicitColumnWidths.isEmpty())
6217 d->explicitColumnWidths.clear();
6218 d->forceLayout(
false);
6221qreal QQuickTableView::explicitColumnWidth(
int column)
const
6225 if (
d->syncHorizontally)
6226 return d->syncView->explicitColumnWidth(
column);
6228 const auto it =
d->explicitColumnWidths.constFind(
column);
6229 if (
it !=
d->explicitColumnWidths.constEnd())
6238 qmlWarning(
this) <<
"row must be greather than, or equal to, zero";
6242 if (
d->syncVertically) {
6243 d->syncView->setRowHeight(
row,
size);
6251 d->explicitRowHeights.remove(
row);
6253 d->explicitRowHeights.insert(
row,
size);
6255 if (
d->loadedItems.isEmpty())
6260 d->forceLayout(
false);
6263void QQuickTableView::clearRowHeights()
6267 if (
d->syncVertically) {
6268 d->syncView->clearRowHeights();
6272 if (
d->explicitRowHeights.isEmpty())
6275 d->explicitRowHeights.clear();
6276 d->forceLayout(
false);
6279qreal QQuickTableView::explicitRowHeight(
int row)
const
6283 if (
d->syncVertically)
6284 return d->syncView->explicitRowHeight(
row);
6286 const auto it =
d->explicitRowHeights.constFind(
row);
6287 if (
it !=
d->explicitRowHeights.constEnd())
6295 if (cell.
x() < 0 || cell.
x() >=
columns() || cell.
y() < 0 || cell.
y() >=
rows())
6298 auto const qaim =
d->model->abstractItemModel();
6302 return qaim->index(cell.
y(), cell.
x());
6307 if (!
index.isValid() ||
index.parent().isValid())
6312#if QT_DEPRECATED_SINCE(6, 4)
6323 qmlWarning(
this) <<
"modelIndex(row, column) is deprecated. "
6324 "Use index(row, column) instead. For more information, see "
6325 "https://doc.qt.io/qt-6/qml-qtquick-tableview-obsolete.html";
6338 return cellAtIndex(
index).y();
6343 return cellAtIndex(
index).x();
6348 d_func()->forceLayout(
true);
6355 if (!
d->canEdit(
index,
true))
6358 if (
d->editIndex ==
index)
6364 if (!
d->editModel) {
6366 d->editModel->useImportVersion(
d->resolveImportVersion());
6368 [
this, d] (
int serializedModelIndex,
QObject *
object) {
6374 d->editIndex = modelIndex(d->cellAtModelIndex(serializedModelIndex));
6375 d->editItem = qmlobject_cast<QQuickItem*>(object);
6379 d->initItemCallback(serializedModelIndex, object);
6380 const auto cellItem = itemAtCell(cellAtIndex(d->editIndex));
6382 d->editItem->setParentItem(cellItem);
6389 if (
d->selectionModel)
6392 if (
d->editIndex.isValid())
6397 const auto attached =
d->getAttachedObject(cellItem);
6400 d->editModel->setModel(
d->tableModel->model());
6401 d->editModel->setDelegate(attached->editDelegate());
6403 const int cellIndex =
d->modelIndexToCellIndex(
index);
6407 d->editItem =
nullptr;
6408 qmlWarning(
this) <<
"cannot edit: TableView.editDelegate could not be instantiated!";
6415 qmlWarning(
this) <<
"cannot edit: TableView.editDelegate is not an Item!";
6416 d->editItem =
nullptr;
6435 if (
QObject *focusObject =
d->editItem->window()->focusObject()) {
6437 if (focusItem ==
d->editItem ||
d->editItem->isAncestorOf(focusItem))
6442void QQuickTableView::closeEditor()
6451 d->editItem =
nullptr;
6454 const int cellIndex =
d->modelIndexToCellIndex(
d->editIndex);
6459 if (
d->editIndex.isValid()) {
6476 if (
d->tableModel) {
6479 d->tableModel->drainReusableItemsPool(0);
6482 d->forceLayout(
false);
6494 if (
d->inSetLocalViewportPos)
6501 d->syncViewportPosRecursive();
6503 auto rootView =
d->rootSyncView();
6504 auto rootView_d = rootView->d_func();
6506 rootView_d->scheduleRebuildIfFastFlick();
6508 if (!rootView_d->polishScheduled) {
6509 if (rootView_d->scheduledRebuildOptions) {
6516 const bool updated = rootView->d_func()->updateTableRecursive();
6530 if (!
d->keyNavigationEnabled) {
6535 if (
d->tableSize.isEmpty())
6538 if (
d->editIndex.isValid()) {
6544 if (
d->setCurrentIndexFromKeyEvent(e))
6547 if (
d->editFromKeyEvent(e))
6560 switch (keyEvent->
key()) {
6563 if (
auto attached =
d->getAttachedObject(
d->editItem))
6564 emit attached->commit();
6570 if (
auto attached =
d->getAttachedObject(
d->editItem))
6571 emit attached->commit();
6573 if (
d->setCurrentIndexFromKeyEvent(keyEvent)) {
6574 const QModelIndex currentIndex =
d->selectionModel->currentIndex();
6575 if (
d->canEdit(currentIndex,
false))
6592 return d_func()->alternatingRows;
6602 emit alternatingRowsChanged();
6607 return d_func()->selectionBehavior;
6617 emit selectionBehaviorChanged();
6622 return d_func()->selectionMode;
6632 emit selectionModeChanged();
6637 return d_func()->resizableColumns;
6643 if (
d->resizableColumns ==
enabled)
6647 d->resizeHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6648 d->hoverHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6650 emit resizableColumnsChanged();
6655 return d_func()->resizableRows;
6665 d->resizeHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6666 d->hoverHandler->setEnabled(
d->resizableRows ||
d->resizableColumns);
6668 emit resizableRowsChanged();
6683#if QT_CONFIG(cursor)
6686 tableViewPrivate->updateCursor();
6696#if QT_CONFIG(cursor)
6701 const auto item = tableView->itemAtCell(cell);
6705#if QT_CONFIG(cursor)
6706 tableViewPrivate->updateCursor();
6712 const bool hoveringRow = (itemPos.y() <
margin() || itemPos.y() >
item->height() -
margin());
6713 const bool hoveringColumn = (itemPos.x() <
margin() || itemPos.x() >
item->width() -
margin());
6714 m_row = hoveringRow ? itemPos.
y() <
margin() ? cell.
y() - 1 : cell.
y() : -1;
6715 m_column = hoveringColumn ? itemPos.x() <
margin() ? cell.
x() - 1 : cell.
x() : -1;
6716#if QT_CONFIG(cursor)
6717 tableViewPrivate->updateCursor();
6740 switch (transition) {
6763 if (
event->type() == QEvent::Type::Wheel)
6789 m_row = tableViewPrivate->resizableRows ? tableViewPrivate->hoverHandler->m_row : -1;
6790 m_column = tableViewPrivate->resizableColumns ? tableViewPrivate->hoverHandler->m_column : -1;
6805 const qreal dragDist =
qSqrt(distX * distX + distY * distY);
6806 if (dragDist >
qApp->styleHints()->startDragDistance())
6825#if QT_CONFIG(cursor)
6837 tableView->setFiltersChildMouseEvents(
false);
6845#if QT_CONFIG(cursor)
6846 tableViewPrivate->updateCursor();
6858 tableView->setFiltersChildMouseEvents(
true);
6859#if QT_CONFIG(cursor)
6860 tableViewPrivate->updateCursor();
6883#include "moc_qquicktableview_p.cpp"
6884#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 const QAbstractItemModel * model() const noexcept
Returns a pointer to the model containing the item that this 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)
qreal getEffectiveRowHeight(int row) const
void syncLoadedTableFromLoadRequest()
void updateAverageRowHeight()
void rowsMovedCallback(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row)
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 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)
int assignedPositionViewAtRowAfterRebuild
QRectF positionViewAtRowSubRect
bool inSelectionModelUpdate
@ MovePreloadedItemsToPool
virtual void syncDelegate()
qreal positionViewAtRowOffset
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
QMinimalFlatSet< int > loadedColumns
QHash< int, FxTableItem * > loadedItems
QAbstractItemModel * qaim(QVariant modelAsVariant) const
void setLocalViewportY(qreal contentY)
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 updateCurrentRowAndColumn()
QPoint selectionStartCell
QSize calculateTableSize()
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 void syncPositionView()
void adjustViewportYAccordingToAlignment()
int assignedPositionViewAtColumnAfterRebuild
int modelIndexToCellIndex(const QModelIndex &modelIndex) const
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.
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
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)