Qt logo

QSortedList Class Reference


The QSortedList class provides a list sorted by operator< and operator== More...

#include <qsortedlist.h>

Inherits QList.

List of all member functions.

Public Members


Detailed Description

The QSortedList class provides a list sorted by operator< and operator==

If you want to sort a QList you have to reimplement the QGList::compareItems() method. If the elements of your list support operator<() and operator==() then you can use QSortedList instead. Its compareItems() calls operator<() and operator==() and returns an appropriate result.

Otherwise, this is as QList.

See also: QList and Collection Classes


Member Function Documentation

QSortedList::QSortedList ()

Constructs an empty list.

QSortedList::QSortedList ( const QSortedList<type> & list )

Constructs a copy of list.

Each item in list is copied to this new list.

QSortedList::~QSortedList ()

Removes all items from the list and destroys the list.

All list iterators that access this list will be reset.


Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):


This file is part of the Qt toolkit, copyright © 1995-2000 Troll Tech, all rights reserved.


Copyright İ 2000 Troll TechTrademarks
Qt version 2.1.0 (pre-release)