Sets a rectangular, non-full-width rubberband as the new default.
User selection is made wherever the rubberband intersects with the row.
const QRectF widgetRect = m_view->itemRect(index);
if (widgetRect.intersects(rubberBandRect)) {
- const QRectF iconRect = widget->iconRect().translated(widgetRect.topLeft());
- const QRectF textRect = widget->textRect().translated(widgetRect.topLeft());
- if (iconRect.intersects(rubberBandRect) || textRect.intersects(rubberBandRect)) {
+ // Select the full row intersecting with the rubberband rectangle
+ const QRectF selectionRect = widget->selectionRect().translated(widgetRect.topLeft());
+ if (selectionRect.intersects(rubberBandRect)) {
selectedItems.insert(index);
}
}