QComboBox Class Reference


The QComboBox is a menu which shows the currently selected item rather than a menu title when not popped up. (details) (complete member list)

#include <qcombo.h>

Inherits QWidget.

Public Members

Signals

Protected Members


Detailed Description

The QComboBox is a menu which shows the currently selected item rather than a menu title when not popped up.

This class is only partly documented. Our home page contains a pointer to the current version of Qt.


Member Function Documentation

void QComboBox::changeItem (const char *string, int index)

Replaces the item at a given index with a string. If index is out of range the operation is ignored.

void QComboBox::changeItem (const QPixmap &im, int index)

Replaces the item at a given index with a pixmap. If index is out of range the operation is ignored.

void QComboBox::clear ()

Removes all items, leaving an empty combo box button.

void QComboBox::insertItem (const char *string, int index=-1)

Inserts a string item. If index is negative the string will be appended. Note that this operation will change the indexes of all items after the one being inserted. If index is larger then count() - 1 the function returns immediately.

void QComboBox::insertItem (const QPixmap &pixmap, int index=-1)

Inserts a pixmap item. If index is negative the pixmap will be appended. Note that this operation will change the indexes of all items after the one being inserted. If index is larger then count() - 1 the function returns immediately.

QPixmap * QComboBox::pixmap (int index) const

Returns the pixmap item at a given index. If index is out of range or the item indexed is not a pixmap 0 is returned.

void QComboBox::removeItem (int index)

Removes an item. This will change the indexes of all items after the one being removed. If index is negative or larger then count() - 1 the function returns immediately.

void QComboBox::setCurrentItem (int index)

Sets current item, i.e. the item displayed on the combo box button.

const char * QComboBox::string (int index) const

Returns the string item at a given index. If index is out of range or the item indexed is not a string 0 is returned.


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

It was generated from the following files:


Generated at 04:27, 1995/05/20 by the webmaster at Troll Tech