diff options
| author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-10-14 10:54:05 +0200 |
|---|---|---|
| committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-10-18 15:55:52 +0200 |
| commit | 6874f5cf529acd10df02ff460035df42a268c17b (patch) | |
| tree | eb7de832b053061c464642b6637364bf0d1fbd56 /src/quick/items/qquicktableview.cpp | |
| parent | e28e15441afd48a081e6869cd56a62a54b1f7ad2 (diff) | |
SelectionRectangle: ask TableView for acceptance before starting a selection
Add a new virtual function to QQuickSelectable that lets
SelectionRectangle ask TableView up front if it's OK
to start a new selection at the given pos. This will
be useful once TableView adds its own pointer/drag
handler for resizing columns, and will be used to
avoid a situation where a selection starts at the
same time as a resize.
Task-number: QTBUG-106792
Change-Id: Ib0ed2d46802a05b717844ea6278ceef03f28840e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
| -rw-r--r-- | src/quick/items/qquicktableview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 74e3c9ff8b..258171b83e 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -1241,6 +1241,12 @@ QQuickItem *QQuickTableViewPrivate::selectionPointerHandlerTarget() const return const_cast<QQuickTableView *>(q_func())->contentItem(); } +bool QQuickTableViewPrivate::canStartSelection(const QPointF &pos) +{ + Q_UNUSED(pos); + return true; +} + void QQuickTableViewPrivate::setSelectionStartPos(const QPointF &pos) { if (loadedItems.isEmpty()) |
