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

# QListBoxText Class Reference

The QListBoxText class provides list box items that display text. More...

    #include <QListBoxText>

This class is part of the Qt 3 compatibility library. It is provided to keep old source code working. We strongly advise against using it in new code.

Inherits QListBoxItem.

- List of all members, including inherited members

### Public Functions

- QListBoxText ( QListBox * listbox, const QString & text = QString::null )
- QListBoxText ( const QString & text = QString::null )
- QListBoxText ( QListBox * listbox, const QString & text, QListBoxItem * after )
- ~QListBoxText ()
- virtual int height ( const QListBox * lb ) const
- virtual int width ( const QListBox * lb ) const

- 14 public functions inherited from QListBoxItem

### Protected Functions

- virtual void paint ( QPainter * painter )

- 3 protected functions inherited from QListBoxItem

## Detailed Description

The QListBoxText class provides list box items that display text.

The text is drawn in the widget's current font. If you need several different fonts, you must implement your own subclass of QListBoxItem.

See also QListBox and QListBoxItem.

## Member Function Documentation

### QListBoxText::QListBoxText ( QListBox * listbox, const QString & text = QString::null )

Constructs a list box item in list box listbox showing the text text.

### QListBoxText::QListBoxText ( const QString & text = QString::null )

Constructs a list box item showing the text text.

### QListBoxText::QListBoxText ( QListBox * listbox, const QString & text, QListBoxItem * after )

Constructs a list box item in list box listbox showing the text text. The item is inserted after the item after, or at the beginning if after is 0.

### QListBoxText::~QListBoxText ()

Destroys the item.

### int QListBoxText::height ( const QListBox * lb ) const `[virtual]`

Returns the height of a line of text in list box lb.

Reimplemented from QListBoxItem.

See also paint() and width().

### void QListBoxText::paint ( QPainter * painter ) `[virtual protected]`

Draws the text using painter.

Reimplemented from QListBoxItem.

### int QListBoxText::width ( const QListBox * lb ) const `[virtual]`

Returns the width of this line in list box lb.

Reimplemented from QListBoxItem.

See also paint() and height().