Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QSmoothListWidgetItem class provides an item for use with the QSmoothListWidget item view class. More...
#include <QSmoothListWidgetItem>
Inherits QStandardItem.
The QSmoothListWidgetItem class provides an item for use with the QSmoothListWidget item view class.
QSmoothListWidgetItem is used to represent items in a list provided by the QSmoothListWidget class. Each item can hold several pieces of information, and will display these appropriately.
The item view convenience classes use a classic item-based interface rather than a pure model/view approach. For a more flexible list view widget, consider using the QSmoothList class with a standard model.
List items can be automatically inserted into a list when they are constructed by specifying the list widget:
They can also be created without a parent widget, and later inserted into a list (see QSmoothListWidget::insertItem()).
QSmoothListWidgetItem is designed to be a drop-in replacement for simple uses of QSmoothListWidgetItem, when you are using a QSmoothListWidget instead of a QSmoothListWidget. QSmoothListWidgetItem does behave slightly differently though, most notably in that it cannot be hidden.
List items are typically used to display text() and an icon(). These are set with the setText() and setIcon() functions. The appearance of the text can be customized with setFont(), setForeground(), and setBackground(). Text in list items can be aligned using the setTextAlignment() function.
By default, items are enabled, selectable, and checkable. Each item's flags can be changed by calling setFlags() with the appropriate value (see Qt::ItemFlags). Checkable items can be checked, unchecked and partially checked with the setCheckState() function. The corresponding checkState() function indicates what check state the item currently has.
See also QListWidgetItem, QSmoothListWidget, and QSmoothList.
Constructs an empty smooth list widget item of the specified type with the given parent. If the parent is not specified, the item will need to be inserted into a smooth list widget with QSmoothListWidget::insertItem().
See also type().
Constructs an empty smooth list widget item of the specified type with the given text and parent. If the parent is not specified, the item will need to be inserted into a smooth list widget with QSmoothListWidget::insertItem().
See also type().
Constructs an empty smooth list widget item of the specified type with the given icon, text and parent. If the parent is not specified, the item will need to be inserted into a smooth list widget with QSmoothListWidget::insertItem().
See also type().
Sets the item's data for the given role to the specified value.
Same as QStandardItem::setData() but with the parameters reversed.
Included for compatibilty with QListWidgetItem.
Returns the smooth list widget that contains the item.
Returns the type passed to the QSmoothListWidgetItem constructor.
Reimplemented from QStandardItem.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |