API reference - Class QListWidgetItem

Notation used in Ruby API documentation

Description: Binding of QListWidgetItem

Class hierarchy: QListWidgetItem

Public constructors

new QListWidgetItemnew(QListWidget ptr view = 0,
int type = QListWidgetItem::Type)
Constructor QListWidgetItem::QListWidgetItem(QListWidget *view, int type)
new QListWidgetItemnew(string text,
QListWidget ptr view = 0,
int type = QListWidgetItem::Type)
Constructor QListWidgetItem::QListWidgetItem(const QString &text, QListWidget *view, int type)
new QListWidgetItemnew(const QIcon icon,
string text,
QListWidget ptr view = 0,
int type = QListWidgetItem::Type)
Constructor QListWidgetItem::QListWidgetItem(const QIcon &icon, const QString &text, QListWidget *view, int type)
new QListWidgetItemnew(const QListWidgetItem other)Constructor QListWidgetItem::QListWidgetItem(const QListWidgetItem &other)

Public methods

[virtual,const]bool<(const QListWidgetItem other)Virtual method bool QListWidgetItem::operator<(const QListWidgetItem &other)
void_assign(const QListWidgetItem other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
voidassign(const QListWidgetItem other)Assigns another object to self
[const]QBrushbackgroundMethod QBrush QListWidgetItem::background()
voidbackground=(const QBrush brush)Method void QListWidgetItem::setBackground(const QBrush &brush)
[const]QColorbackgroundColorMethod QColor QListWidgetItem::backgroundColor()
voidbackgroundColor=(const QColor color)Method void QListWidgetItem::setBackgroundColor(const QColor &color)
[const]Qt_CheckStatecheckStateMethod Qt::CheckState QListWidgetItem::checkState()
voidcheckState=(const Qt_CheckState state)Method void QListWidgetItem::setCheckState(Qt::CheckState state)
[virtual,const]QListWidgetItem ptrcloneVirtual method QListWidgetItem *QListWidgetItem::clone()
[virtual,const]QVariantdata(int role)Virtual method QVariant QListWidgetItem::data(int role)
[const]new QListWidgetItem ptrdupCreates a copy of self
[const]Qt_QFlags_ItemFlagflagsMethod QFlags<Qt::ItemFlag> QListWidgetItem::flags()
voidflags=(const Qt_QFlags_ItemFlag flags)Method void QListWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)
[const]QFontfontMethod QFont QListWidgetItem::font()
voidfont=(const QFont font)Method void QListWidgetItem::setFont(const QFont &font)
[const]QBrushforegroundMethod QBrush QListWidgetItem::foreground()
voidforeground=(const QBrush brush)Method void QListWidgetItem::setForeground(const QBrush &brush)
[const]boolhiddenMethod bool QListWidgetItem::isHidden()
voidhidden=(bool hide)Method void QListWidgetItem::setHidden(bool hide)
[const]QIconiconMethod QIcon QListWidgetItem::icon()
voidicon=(const QIcon icon)Method void QListWidgetItem::setIcon(const QIcon &icon)
[const]boolisHidden?Method bool QListWidgetItem::isHidden()
[const]boolisSelected?Method bool QListWidgetItem::isSelected()
[const]QListWidget ptrlistWidgetMethod QListWidget *QListWidgetItem::listWidget()
[virtual]voidread(QDataStream in)Virtual method void QListWidgetItem::read(QDataStream &in)
[const]boolselectedMethod bool QListWidgetItem::isSelected()
voidselected=(bool select)Method void QListWidgetItem::setSelected(bool select)
voidsetBackground(const QBrush brush)Method void QListWidgetItem::setBackground(const QBrush &brush)
[virtual]voidsetBackgroundColor(const QColor color)Virtual method void QListWidgetItem::setBackgroundColor(const QColor &color)
voidsetCheckState(const Qt_CheckState state)Method void QListWidgetItem::setCheckState(Qt::CheckState state)
[virtual]voidsetData(int role,
const QVariant value)
Virtual method void QListWidgetItem::setData(int role, const QVariant &value)
voidsetFlags(const Qt_QFlags_ItemFlag flags)Method void QListWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)
voidsetFont(const QFont font)Method void QListWidgetItem::setFont(const QFont &font)
voidsetForeground(const QBrush brush)Method void QListWidgetItem::setForeground(const QBrush &brush)
voidsetHidden(bool hide)Method void QListWidgetItem::setHidden(bool hide)
voidsetIcon(const QIcon icon)Method void QListWidgetItem::setIcon(const QIcon &icon)
voidsetSelected(bool select)Method void QListWidgetItem::setSelected(bool select)
voidsetSizeHint(const QSize size)Method void QListWidgetItem::setSizeHint(const QSize &size)
voidsetStatusTip(string statusTip)Method void QListWidgetItem::setStatusTip(const QString &statusTip)
voidsetText(string text)Method void QListWidgetItem::setText(const QString &text)
voidsetTextAlignment(int alignment)Method void QListWidgetItem::setTextAlignment(int alignment)
voidsetTextColor(const QColor color)Method void QListWidgetItem::setTextColor(const QColor &color)
voidsetToolTip(string toolTip)Method void QListWidgetItem::setToolTip(const QString &toolTip)
voidsetWhatsThis(string whatsThis)Method void QListWidgetItem::setWhatsThis(const QString &whatsThis)
[const]QSizesizeHintMethod QSize QListWidgetItem::sizeHint()
voidsizeHint=(const QSize size)Method void QListWidgetItem::setSizeHint(const QSize &size)
[const]stringstatusTipMethod QString QListWidgetItem::statusTip()
voidstatusTip=(string statusTip)Method void QListWidgetItem::setStatusTip(const QString &statusTip)
[const]stringtextMethod QString QListWidgetItem::text()
voidtext=(string text)Method void QListWidgetItem::setText(const QString &text)
[const]inttextAlignmentMethod int QListWidgetItem::textAlignment()
voidtextAlignment=(int alignment)Method void QListWidgetItem::setTextAlignment(int alignment)
[const]QColortextColorMethod QColor QListWidgetItem::textColor()
voidtextColor=(const QColor color)Method void QListWidgetItem::setTextColor(const QColor &color)
[const]stringtoolTipMethod QString QListWidgetItem::toolTip()
voidtoolTip=(string toolTip)Method void QListWidgetItem::setToolTip(const QString &toolTip)
[const]inttypeMethod int QListWidgetItem::type()
[const]stringwhatsThisMethod QString QListWidgetItem::whatsThis()
voidwhatsThis=(string whatsThis)Method void QListWidgetItem::setWhatsThis(const QString &whatsThis)
[virtual,const]voidwrite(QDataStream out)Virtual method void QListWidgetItem::write(QDataStream &out)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[virtual,const] bool <(const QListWidgetItem other)

Description: Virtual method bool QListWidgetItem::operator<(const QListWidgetItem &other)

This method can be reimplemented in a derived class.

void _assign(const QListWidgetItem other)

Description: Assigns another object to self

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

void assign(const QListWidgetItem other)

Description: Assigns another object to self

[const] QBrush background

Description: Method QBrush QListWidgetItem::background()

Python specific notes:

The object exposes a readable attribute 'background'. This is the getter.

void background=(const QBrush brush)

Description: Method void QListWidgetItem::setBackground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'background'. This is the setter.

[const] QColor backgroundColor

Description: Method QColor QListWidgetItem::backgroundColor()

Python specific notes:

The object exposes a readable attribute 'backgroundColor'. This is the getter.

void backgroundColor=(const QColor color)

Description: Method void QListWidgetItem::setBackgroundColor(const QColor &color)

Python specific notes:

The object exposes a writable attribute 'backgroundColor'. This is the setter.

[const] Qt_CheckState checkState

Description: Method Qt::CheckState QListWidgetItem::checkState()

Python specific notes:

The object exposes a readable attribute 'checkState'. This is the getter.

void checkState=(const Qt_CheckState state)

Description: Method void QListWidgetItem::setCheckState(Qt::CheckState state)

Python specific notes:

The object exposes a writable attribute 'checkState'. This is the setter.

[virtual,const] QListWidgetItem ptr clone

Description: Virtual method QListWidgetItem *QListWidgetItem::clone()

This method can be reimplemented in a derived class.

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

[virtual,const] QVariant data(int role)

Description: Virtual method QVariant QListWidgetItem::data(int role)

This method can be reimplemented in a derived class.

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] new QListWidgetItem ptr dup

Description: Creates a copy of self

[const] Qt_QFlags_ItemFlag flags

Description: Method QFlags<Qt::ItemFlag> QListWidgetItem::flags()

Python specific notes:

The object exposes a readable attribute 'flags'. This is the getter.

void flags=(const Qt_QFlags_ItemFlag flags)

Description: Method void QListWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)

Python specific notes:

The object exposes a writable attribute 'flags'. This is the setter.

[const] QFont font

Description: Method QFont QListWidgetItem::font()

Python specific notes:

The object exposes a readable attribute 'font'. This is the getter.

void font=(const QFont font)

Description: Method void QListWidgetItem::setFont(const QFont &font)

Python specific notes:

The object exposes a writable attribute 'font'. This is the setter.

[const] QBrush foreground

Description: Method QBrush QListWidgetItem::foreground()

Python specific notes:

The object exposes a readable attribute 'foreground'. This is the getter.

void foreground=(const QBrush brush)

Description: Method void QListWidgetItem::setForeground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'foreground'. This is the setter.

[const] bool hidden

Description: Method bool QListWidgetItem::isHidden()

Python specific notes:

The object exposes a readable attribute 'hidden'. This is the getter.

void hidden=(bool hide)

Description: Method void QListWidgetItem::setHidden(bool hide)

Python specific notes:

The object exposes a writable attribute 'hidden'. This is the setter.

[const] QIcon icon

Description: Method QIcon QListWidgetItem::icon()

Python specific notes:

The object exposes a readable attribute 'icon'. This is the getter.

void icon=(const QIcon icon)

Description: Method void QListWidgetItem::setIcon(const QIcon &icon)

Python specific notes:

The object exposes a writable attribute 'icon'. This is the setter.

[const] bool isHidden?

Description: Method bool QListWidgetItem::isHidden()

Python specific notes:

The object exposes a readable attribute 'hidden'. This is the getter.

[const] bool isSelected?

Description: Method bool QListWidgetItem::isSelected()

Python specific notes:

The object exposes a readable attribute 'selected'. This is the getter.

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[const] QListWidget ptr listWidget

Description: Method QListWidget *QListWidgetItem::listWidget()

[static] new QListWidgetItem new(QListWidget ptr view = 0,int type = QListWidgetItem::Type)

Description: Constructor QListWidgetItem::QListWidgetItem(QListWidget *view, int type)

This method creates an object of class QListWidgetItem.

Python specific notes:

This method is the default initializer of the object

[static] new QListWidgetItem new(string text,QListWidget ptr view = 0,int type = QListWidgetItem::Type)

Description: Constructor QListWidgetItem::QListWidgetItem(const QString &text, QListWidget *view, int type)

This method creates an object of class QListWidgetItem.

Python specific notes:

This method is the default initializer of the object

[static] new QListWidgetItem new(const QIcon icon,string text,QListWidget ptr view = 0,int type = QListWidgetItem::Type)

Description: Constructor QListWidgetItem::QListWidgetItem(const QIcon &icon, const QString &text, QListWidget *view, int type)

This method creates an object of class QListWidgetItem.

Python specific notes:

This method is the default initializer of the object

[static] new QListWidgetItem new(const QListWidgetItem other)

Description: Constructor QListWidgetItem::QListWidgetItem(const QListWidgetItem &other)

This method creates an object of class QListWidgetItem.

Python specific notes:

This method is the default initializer of the object

[virtual] void read(QDataStream in)

Description: Virtual method void QListWidgetItem::read(QDataStream &in)

This method can be reimplemented in a derived class.

[const] bool selected

Description: Method bool QListWidgetItem::isSelected()

Python specific notes:

The object exposes a readable attribute 'selected'. This is the getter.

void selected=(bool select)

Description: Method void QListWidgetItem::setSelected(bool select)

Python specific notes:

The object exposes a writable attribute 'selected'. This is the setter.

void setBackground(const QBrush brush)

Description: Method void QListWidgetItem::setBackground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'background'. This is the setter.

[virtual] void setBackgroundColor(const QColor color)

Description: Virtual method void QListWidgetItem::setBackgroundColor(const QColor &color)

This method can be reimplemented in a derived class.

void setCheckState(const Qt_CheckState state)

Description: Method void QListWidgetItem::setCheckState(Qt::CheckState state)

Python specific notes:

The object exposes a writable attribute 'checkState'. This is the setter.

[virtual] void setData(int role,const QVariant value)

Description: Virtual method void QListWidgetItem::setData(int role, const QVariant &value)

This method can be reimplemented in a derived class.

void setFlags(const Qt_QFlags_ItemFlag flags)

Description: Method void QListWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)

Python specific notes:

The object exposes a writable attribute 'flags'. This is the setter.

void setFont(const QFont font)

Description: Method void QListWidgetItem::setFont(const QFont &font)

Python specific notes:

The object exposes a writable attribute 'font'. This is the setter.

void setForeground(const QBrush brush)

Description: Method void QListWidgetItem::setForeground(const QBrush &brush)

Python specific notes:

The object exposes a writable attribute 'foreground'. This is the setter.

void setHidden(bool hide)

Description: Method void QListWidgetItem::setHidden(bool hide)

Python specific notes:

The object exposes a writable attribute 'hidden'. This is the setter.

void setIcon(const QIcon icon)

Description: Method void QListWidgetItem::setIcon(const QIcon &icon)

Python specific notes:

The object exposes a writable attribute 'icon'. This is the setter.

void setSelected(bool select)

Description: Method void QListWidgetItem::setSelected(bool select)

Python specific notes:

The object exposes a writable attribute 'selected'. This is the setter.

void setSizeHint(const QSize size)

Description: Method void QListWidgetItem::setSizeHint(const QSize &size)

Python specific notes:

The object exposes a writable attribute 'sizeHint'. This is the setter.

void setStatusTip(string statusTip)

Description: Method void QListWidgetItem::setStatusTip(const QString &statusTip)

Python specific notes:

The object exposes a writable attribute 'statusTip'. This is the setter.

void setText(string text)

Description: Method void QListWidgetItem::setText(const QString &text)

Python specific notes:

The object exposes a writable attribute 'text'. This is the setter.

void setTextAlignment(int alignment)

Description: Method void QListWidgetItem::setTextAlignment(int alignment)

Python specific notes:

The object exposes a writable attribute 'textAlignment'. This is the setter.

void setTextColor(const QColor color)

Description: Method void QListWidgetItem::setTextColor(const QColor &color)

Python specific notes:

The object exposes a writable attribute 'textColor'. This is the setter.

void setToolTip(string toolTip)

Description: Method void QListWidgetItem::setToolTip(const QString &toolTip)

Python specific notes:

The object exposes a writable attribute 'toolTip'. This is the setter.

void setWhatsThis(string whatsThis)

Description: Method void QListWidgetItem::setWhatsThis(const QString &whatsThis)

Python specific notes:

The object exposes a writable attribute 'whatsThis'. This is the setter.

[const] QSize sizeHint

Description: Method QSize QListWidgetItem::sizeHint()

Python specific notes:

The object exposes a readable attribute 'sizeHint'. This is the getter.

void sizeHint=(const QSize size)

Description: Method void QListWidgetItem::setSizeHint(const QSize &size)

Python specific notes:

The object exposes a writable attribute 'sizeHint'. This is the setter.

[const] string statusTip

Description: Method QString QListWidgetItem::statusTip()

Python specific notes:

The object exposes a readable attribute 'statusTip'. This is the getter.

void statusTip=(string statusTip)

Description: Method void QListWidgetItem::setStatusTip(const QString &statusTip)

Python specific notes:

The object exposes a writable attribute 'statusTip'. This is the setter.

[const] string text

Description: Method QString QListWidgetItem::text()

Python specific notes:

The object exposes a readable attribute 'text'. This is the getter.

void text=(string text)

Description: Method void QListWidgetItem::setText(const QString &text)

Python specific notes:

The object exposes a writable attribute 'text'. This is the setter.

[const] int textAlignment

Description: Method int QListWidgetItem::textAlignment()

Python specific notes:

The object exposes a readable attribute 'textAlignment'. This is the getter.

void textAlignment=(int alignment)

Description: Method void QListWidgetItem::setTextAlignment(int alignment)

Python specific notes:

The object exposes a writable attribute 'textAlignment'. This is the setter.

[const] QColor textColor

Description: Method QColor QListWidgetItem::textColor()

Python specific notes:

The object exposes a readable attribute 'textColor'. This is the getter.

void textColor=(const QColor color)

Description: Method void QListWidgetItem::setTextColor(const QColor &color)

Python specific notes:

The object exposes a writable attribute 'textColor'. This is the setter.

[const] string toolTip

Description: Method QString QListWidgetItem::toolTip()

Python specific notes:

The object exposes a readable attribute 'toolTip'. This is the getter.

void toolTip=(string toolTip)

Description: Method void QListWidgetItem::setToolTip(const QString &toolTip)

Python specific notes:

The object exposes a writable attribute 'toolTip'. This is the setter.

[const] int type

Description: Method int QListWidgetItem::type()

[const] string whatsThis

Description: Method QString QListWidgetItem::whatsThis()

Python specific notes:

The object exposes a readable attribute 'whatsThis'. This is the getter.

void whatsThis=(string whatsThis)

Description: Method void QListWidgetItem::setWhatsThis(const QString &whatsThis)

Python specific notes:

The object exposes a writable attribute 'whatsThis'. This is the setter.

[virtual,const] void write(QDataStream out)

Description: Virtual method void QListWidgetItem::write(QDataStream &out)

This method can be reimplemented in a derived class.