Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QObjectList Class Reference

The QObjectList class is a QPtrList of QObjects. More...

`#include <qobjectlist.h>`

Inherits QPtrList<QObject>.

List of all member functions.

## Public Members

- QObjectList ()
- QObjectList ( const QObjectList & list )
- ~QObjectList ()
- QObjectList & operator= ( const QObjectList & list )

## Detailed Description

The QObjectList class is a QPtrList of QObjects.

A QObjectList is a QPtrList<QObject>. The list can be traversed using inherited functions, e.g. getFirst(), next(), etc., or using a QObjectListIterator iterator.

See QObject::queryList() for an example of use.

See also QObjectListIterator, QObject, Collection Classes, and Non-GUI Classes.

## Member Function Documentation

### QObjectList::QObjectList ()

Constructs an empty QObject list.

### QObjectList::QObjectList ( const QObjectList & list )

Constructs a copy of list.

Each item in list is appended to this list. Only the pointers are copied (shallow copy).

### QObjectList::~QObjectList ()

Removes all the object pointers from the list and destroys the list.

All list iterators that access this list will be reset.

See also setAutoDelete().

### QObjectList & QObjectList::operator= ( const QObjectList & list )

Assigns list to this list and returns a reference to this list.

This list is first cleared and then each item in list is appended to this list. Only the pointers are copied (shallow copy) unless newItem() has been reimplemented().

This file is part of the Qt toolkit. Copyright © 1995-2004 Trolltech. All Rights Reserved.