| 761 | } |
| 762 | |
| 763 | void InstanceView::setSelection(const QRect& rect, const QItemSelectionModel::SelectionFlags commands) |
| 764 | { |
| 765 | executeDelayedItemsLayout(); |
| 766 | |
| 767 | for (int i = 0; i < model()->rowCount(); ++i) { |
| 768 | QModelIndex index = model()->index(i, 0); |
| 769 | QRect itemRect = visualRect(index); |
| 770 | if (itemRect.intersects(rect)) { |
| 771 | selectionModel()->select(index, commands); |
| 772 | update(itemRect.translated(-offset())); |
| 773 | } |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | QPixmap InstanceView::renderToPixmap(const QModelIndexList& indices, QRect* r) const |
| 778 | { |