Home · Overviews · Examples 

QItemSelectionRange Class Reference
[com.trolltech.qt.gui module]

The QItemSelectionRange class manages information about a range of selected items in a model. More...


Detailed Description

The QItemSelectionRange class manages information about a range of selected items in a model.

A QItemSelectionRange contains information about a range of selected items in a model. A range of items is a contiguous array of model items, extending to cover a number of adjacent rows and columns with a common parent item; this can be visualized as a two-dimensional block of cells in a table. A selection range has a top, left a bottom, right and a parent.

The QItemSelectionRange class is one of the Model/View Classes and is part of Qt's model/view framework.

The model items contained in the selection range can be obtained by using the items() function. Use QItemSelectionModel::selectedIndexes() to get a list of all selected items for a view.

You can determine whether a given model item lies within a particular range by using the contains function. Ranges can also be compared using the overloaded operators for equality and inequality, and the intersects function allows you to determine whether two ranges overlap.

See also Model/View Programming, QAbstractItemModel, QItemSelection, and QItemSelectionModel.


Copyright © 2008 Trolltech Trademarks
Qt Jambi 4.3.5_01