.BI "virtual void \fBsetStringList\fR ( const QStringList & l )"
.br
.ti -1c
.BI "virtual int \fBrtti\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QComboTableItem class provides a means of using comboboxes in QTables.
.PP
A QComboTableItem is a table item which looks and behaves like a combobox. The advantage of using QComboTableItems rather than real comboboxes is that a QComboTableItem uses far less resources than real comboboxes in QTables. When the cell has the focus it displays a real combobox which the user can interact with. When the cell does not have the focus the cell \fIlooks\fR like a combobox. Only text items (i.e. no pixmaps) may be used in QComboTableItems.
.PP
QComboTableItem items have the edit type WhenCurrent (see EditType). The QComboTableItem's list of items is provided by a QStringList passed to the constructor.
.PP
The list of items may be changed using setStringList(). The current item can be set with setCurrentItem() and retrieved with currentItem(). The text of the current item can be obtained with currentText(), and the text of a particular item can be retrieved with text().
.PP
If isEditable() is TRUE the QComboTableItem will permit the user to either choose an existing list item, or create a new list item by entering their own text; otherwise the user may only choose one of the existing list items.
.PP
To populate a table cell with a QComboTableItem use QTable::setItem().
.PP
QComboTableItems may be deleted with QTable::clearCell().
.PP
QComboTableItems can be distinguished from QTableItems and QCheckTableItems using their Run Time Type Identification number (see rtti()).
.PP
<center>
.ce 1
.B "[Image Omitted]"
.PP
</center>
.PP
See also QCheckTableItem, QTableItem, QComboBox, and Advanced Widgets.
Creates a combo table item for the table \fItable\fR. The combobox's list of items is passed in the \fIlist\fR argument. If \fIeditable\fR is TRUE the user may type in new list items; if \fIeditable\fR is FALSE the user may only select from the list of items provided.
.PP
By default QComboTableItems cannot be replaced by other table items since isReplaceable() returns FALSE by default.
.PP
See also QTable::clearCell() and EditType.
.SH "QComboTableItem::~QComboTableItem ()"
QComboTableItem destructor.
.SH "int QComboTableItem::count () const"
Returns the total number of list items in the combo table item.
.SH "int QComboTableItem::currentItem () const"
Returns the index of the combo table item's current list item.
Make your derived classes return their own values for rtti()to distinguish between different table item subclasses. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class.
.PP
See also QTableItem::rtti().
.PP
Reimplemented from QTableItem.
.SH "void QComboTableItem::setCurrentItem ( int i )\fC [virtual]\fR"
Sets the list item \fIi\fR to be the combo table item's current list item.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the list item whose text is \fIs\fR to be the combo table item's current list item. Does nothing if no list item has the text \fIs\fR.
.PP
See also currentItem().
.SH "void QComboTableItem::setEditable ( bool b )\fC [virtual]\fR"
If \fIb\fR is TRUE the combo table item can be edited, i.e. the user may enter a new text item themselves. If \fIb\fR is FALSE the user may may only choose one of the existing items.
.PP
See also isEditable().
.SH "void QComboTableItem::setStringList ( const QStringList & l )\fC [virtual]\fR"
Sets the list items of this QComboTableItem to the strings in the string list \fIl\fR.