CheckFilterModel

class qte.CheckFilterModel(titles=None)

A list model presenting filter options.

This subclasses from DataModel, and has a single column containing "Select All" and the values in source. "Select All" is tristate, indicating (and setting) the check state of all other values.

If titles is omitted, a single column is assumed.

This would commonly be used as the model of a combo or list widget to allow the user to filter out values from a data source. By default, all items are selected and any new ones added are automatically selected.

When the filter changes, a filterChanged signal is emitted with a set of unselected values.

Members

Inherits

New Methods

CheckFilterModel.selectedState()

Return the check state of the "Select All" option

Re-implemented Methods

CheckFilterModel.data(index, role=<class 'DisplayRole'>)

See also

DataModel.data

CheckFilterModel.rowCount(parent=None)

Add one row (i.e. “Select All”) to the row count.

CheckFilterModel.setData(index, value, role=<class 'EditRole'>)

Signals

CheckFilterModel.filterChanged(set)

Project Versions

Table Of Contents

Previous topic

CheckBox

Next topic

ComboBox

This Page