Qt logo

QSortedList Class Reference


The QSortedList class allows sorting of elements which implement operator< More...

#include <qsortedlist.h>

Inherits QList.

List of all member functions.

Public Members


Detailed Description

The QSortedList class allows sorting of elements which implement operator<

If you want to sort a QList you have to reimplement the QGList::compareItems method. If the elements of your list support the operator< and operator== then you can use QSortedList instead. It does not force you to reimplement QGList::compareItems to sort the list.

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-99 Troll Tech, all rights reserved.


Copyright İ 1999 Troll TechTrademarks
Qt version 2.0.2