API reference - Class QTableWidgetItem

Notation used in Ruby API documentation

Module: QtWidgets

Description: Binding of QTableWidgetItem

Class hierarchy: QTableWidgetItem

Public constructors

new QTableWidgetItemnew(int type = QTableWidgetItem::Type)Constructor QTableWidgetItem::QTableWidgetItem(int type)
new QTableWidgetItemnew(string text,
int type = QTableWidgetItem::Type)
Constructor QTableWidgetItem::QTableWidgetItem(const QString &text, int type)
new QTableWidgetItemnew(const QIcon icon,
string text,
int type = QTableWidgetItem::Type)
Constructor QTableWidgetItem::QTableWidgetItem(const QIcon &icon, const QString &text, int type)
new QTableWidgetItemnew(const QTableWidgetItem other)Constructor QTableWidgetItem::QTableWidgetItem(const QTableWidgetItem &other)

Public methods

[const]bool<(const QTableWidgetItem other)Virtual method bool QTableWidgetItem::operator<(const QTableWidgetItem &other)
void_assign(const QTableWidgetItem 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]new QTableWidgetItem ptr_dupCreates a copy of self
[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.
QTableWidgetItemassign(const QTableWidgetItem other)Method QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
[const]QBrushbackgroundMethod QBrush QTableWidgetItem::background()
voidbackground=(const QBrush brush)Method void QTableWidgetItem::setBackground(const QBrush &brush)
[const]QColorbackgroundColorMethod QColor QTableWidgetItem::backgroundColor()
voidbackgroundColor=(const QColor color)Method void QTableWidgetItem::setBackgroundColor(const QColor &color)
[const]Qt_CheckStatecheckStateMethod Qt::CheckState QTableWidgetItem::checkState()
voidcheckState=(const Qt_CheckState state)Method void QTableWidgetItem::setCheckState(Qt::CheckState state)
[const]QTableWidgetItem ptrcloneVirtual method QTableWidgetItem *QTableWidgetItem::clone()
[const]intcolumnMethod int QTableWidgetItem::column()
[const]variantdata(int role)Virtual method QVariant QTableWidgetItem::data(int role)
[const]new QTableWidgetItem ptrdupCreates a copy of self
[const]Qt_QFlags_ItemFlagflagsMethod QFlags<Qt::ItemFlag> QTableWidgetItem::flags()
voidflags=(Qt_QFlags_ItemFlag flags)Method void QTableWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)
[const]QFontfontMethod QFont QTableWidgetItem::font()
voidfont=(const QFont font)Method void QTableWidgetItem::setFont(const QFont &font)
[const]QBrushforegroundMethod QBrush QTableWidgetItem::foreground()
voidforeground=(const QBrush brush)Method void QTableWidgetItem::setForeground(const QBrush &brush)
[const]QIconiconMethod QIcon QTableWidgetItem::icon()
voidicon=(const QIcon icon)Method void QTableWidgetItem::setIcon(const QIcon &icon)
[const]boolisSelected?Method bool QTableWidgetItem::isSelected()
voidread(QDataStream in)Virtual method void QTableWidgetItem::read(QDataStream &in)
[const]introwMethod int QTableWidgetItem::row()
[const]boolselectedMethod bool QTableWidgetItem::isSelected()
voidselected=(bool select)Method void QTableWidgetItem::setSelected(bool select)
voidsetBackground(const QBrush brush)Method void QTableWidgetItem::setBackground(const QBrush &brush)
voidsetBackgroundColor(const QColor color)Method void QTableWidgetItem::setBackgroundColor(const QColor &color)
voidsetCheckState(const Qt_CheckState state)Method void QTableWidgetItem::setCheckState(Qt::CheckState state)
voidsetData(int role,
variant value)
Virtual method void QTableWidgetItem::setData(int role, const QVariant &value)
voidsetFlags(Qt_QFlags_ItemFlag flags)Method void QTableWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)
voidsetFont(const QFont font)Method void QTableWidgetItem::setFont(const QFont &font)
voidsetForeground(const QBrush brush)Method void QTableWidgetItem::setForeground(const QBrush &brush)
voidsetIcon(const QIcon icon)Method void QTableWidgetItem::setIcon(const QIcon &icon)
voidsetSelected(bool select)Method void QTableWidgetItem::setSelected(bool select)
voidsetSizeHint(const QSize size)Method void QTableWidgetItem::setSizeHint(const QSize &size)
voidsetStatusTip(string statusTip)Method void QTableWidgetItem::setStatusTip(const QString &statusTip)
voidsetText(string text)Method void QTableWidgetItem::setText(const QString &text)
voidsetTextAlignment(int alignment)Method void QTableWidgetItem::setTextAlignment(int alignment)
voidsetTextColor(const QColor color)Method void QTableWidgetItem::setTextColor(const QColor &color)
voidsetToolTip(string toolTip)Method void QTableWidgetItem::setToolTip(const QString &toolTip)
voidsetWhatsThis(string whatsThis)Method void QTableWidgetItem::setWhatsThis(const QString &whatsThis)
[const]QSizesizeHintMethod QSize QTableWidgetItem::sizeHint()
voidsizeHint=(const QSize size)Method void QTableWidgetItem::setSizeHint(const QSize &size)
[const]stringstatusTipMethod QString QTableWidgetItem::statusTip()
voidstatusTip=(string statusTip)Method void QTableWidgetItem::setStatusTip(const QString &statusTip)
[const]QTableWidget ptrtableWidgetMethod QTableWidget *QTableWidgetItem::tableWidget()
[const]stringtextMethod QString QTableWidgetItem::text()
voidtext=(string text)Method void QTableWidgetItem::setText(const QString &text)
[const]inttextAlignmentMethod int QTableWidgetItem::textAlignment()
voidtextAlignment=(int alignment)Method void QTableWidgetItem::setTextAlignment(int alignment)
[const]QColortextColorMethod QColor QTableWidgetItem::textColor()
voidtextColor=(const QColor color)Method void QTableWidgetItem::setTextColor(const QColor &color)
[const]stringtoolTipMethod QString QTableWidgetItem::toolTip()
voidtoolTip=(string toolTip)Method void QTableWidgetItem::setToolTip(const QString &toolTip)
[const]inttypeMethod int QTableWidgetItem::type()
[const]stringwhatsThisMethod QString QTableWidgetItem::whatsThis()
voidwhatsThis=(string whatsThis)Method void QTableWidgetItem::setWhatsThis(const QString &whatsThis)
[const]voidwrite(QDataStream out)Virtual method void QTableWidgetItem::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

<

Signature: [const] bool < (const QTableWidgetItem other)

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

This method can be reimplemented in a derived class.

_assign

Signature: void _assign (const QTableWidgetItem other)

Description: Assigns another object to self

_create

Signature: 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.

_destroy

Signature: 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.

_destroyed?

Signature: [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.

_dup

Signature: [const] new QTableWidgetItem ptr _dup

Description: Creates a copy of self

_is_const_object?

Signature: [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.

_manage

Signature: 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.

_unmanage

Signature: 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.

assign

Signature: QTableWidgetItem assign (const QTableWidgetItem other)

Description: Method QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)

background

Signature: [const] QBrush background

Description: Method QBrush QTableWidgetItem::background()

Python specific notes:
The object exposes a readable attribute 'background'. This is the getter.

background=

Signature: void background= (const QBrush brush)

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

Python specific notes:
The object exposes a writable attribute 'background'. This is the setter.

backgroundColor

Signature: [const] QColor backgroundColor

Description: Method QColor QTableWidgetItem::backgroundColor()

Python specific notes:
The object exposes a readable attribute 'backgroundColor'. This is the getter.

backgroundColor=

Signature: void backgroundColor= (const QColor color)

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

Python specific notes:
The object exposes a writable attribute 'backgroundColor'. This is the setter.

checkState

Signature: [const] Qt_CheckState checkState

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

Python specific notes:
The object exposes a readable attribute 'checkState'. This is the getter.

checkState=

Signature: void checkState= (const Qt_CheckState state)

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

Python specific notes:
The object exposes a writable attribute 'checkState'. This is the setter.

clone

Signature: [const] QTableWidgetItem ptr clone

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

This method can be reimplemented in a derived class.

column

Signature: [const] int column

Description: Method int QTableWidgetItem::column()

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

data

Signature: [const] variant data (int role)

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

This method can be reimplemented in a derived class.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

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.

destroyed?

Signature: [const] bool destroyed?

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

Use of this method is deprecated. Use _destroyed? instead

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.

dup

Signature: [const] new QTableWidgetItem ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

flags

Signature: [const] Qt_QFlags_ItemFlag flags

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

Python specific notes:
The object exposes a readable attribute 'flags'. This is the getter.

flags=

Signature: void flags= (Qt_QFlags_ItemFlag flags)

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

Python specific notes:
The object exposes a writable attribute 'flags'. This is the setter.

font

Signature: [const] QFont font

Description: Method QFont QTableWidgetItem::font()

Python specific notes:
The object exposes a readable attribute 'font'. This is the getter.

font=

Signature: void font= (const QFont font)

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

Python specific notes:
The object exposes a writable attribute 'font'. This is the setter.

foreground

Signature: [const] QBrush foreground

Description: Method QBrush QTableWidgetItem::foreground()

Python specific notes:
The object exposes a readable attribute 'foreground'. This is the getter.

foreground=

Signature: void foreground= (const QBrush brush)

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

Python specific notes:
The object exposes a writable attribute 'foreground'. This is the setter.

icon

Signature: [const] QIcon icon

Description: Method QIcon QTableWidgetItem::icon()

Python specific notes:
The object exposes a readable attribute 'icon'. This is the getter.

icon=

Signature: void icon= (const QIcon icon)

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

Python specific notes:
The object exposes a writable attribute 'icon'. This is the setter.

isSelected?

Signature: [const] bool isSelected?

Description: Method bool QTableWidgetItem::isSelected()

Python specific notes:
The object exposes a readable attribute 'selected'. This is the getter.

is_const_object?

Signature: [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

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

new

(1) Signature: [static] new QTableWidgetItem new (int type = QTableWidgetItem::Type)

Description: Constructor QTableWidgetItem::QTableWidgetItem(int type)

This method creates an object of class QTableWidgetItem.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QTableWidgetItem new (string text, int type = QTableWidgetItem::Type)

Description: Constructor QTableWidgetItem::QTableWidgetItem(const QString &text, int type)

This method creates an object of class QTableWidgetItem.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QTableWidgetItem new (const QIcon icon, string text, int type = QTableWidgetItem::Type)

Description: Constructor QTableWidgetItem::QTableWidgetItem(const QIcon &icon, const QString &text, int type)

This method creates an object of class QTableWidgetItem.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QTableWidgetItem new (const QTableWidgetItem other)

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

This method creates an object of class QTableWidgetItem.

Python specific notes:
This method is the default initializer of the object.

read

Signature: void read (QDataStream in)

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

This method can be reimplemented in a derived class.

row

Signature: [const] int row

Description: Method int QTableWidgetItem::row()

selected

Signature: [const] bool selected

Description: Method bool QTableWidgetItem::isSelected()

Python specific notes:
The object exposes a readable attribute 'selected'. This is the getter.

selected=

Signature: void selected= (bool select)

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

Python specific notes:
The object exposes a writable attribute 'selected'. This is the setter.

setBackground

Signature: void setBackground (const QBrush brush)

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

Python specific notes:
The object exposes a writable attribute 'background'. This is the setter.

setBackgroundColor

Signature: void setBackgroundColor (const QColor color)

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

Python specific notes:
The object exposes a writable attribute 'backgroundColor'. This is the setter.

setCheckState

Signature: void setCheckState (const Qt_CheckState state)

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

Python specific notes:
The object exposes a writable attribute 'checkState'. This is the setter.

setData

Signature: void setData (int role, variant value)

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

This method can be reimplemented in a derived class.

setFlags

Signature: void setFlags (Qt_QFlags_ItemFlag flags)

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

Python specific notes:
The object exposes a writable attribute 'flags'. This is the setter.

setFont

Signature: void setFont (const QFont font)

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

Python specific notes:
The object exposes a writable attribute 'font'. This is the setter.

setForeground

Signature: void setForeground (const QBrush brush)

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

Python specific notes:
The object exposes a writable attribute 'foreground'. This is the setter.

setIcon

Signature: void setIcon (const QIcon icon)

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

Python specific notes:
The object exposes a writable attribute 'icon'. This is the setter.

setSelected

Signature: void setSelected (bool select)

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

Python specific notes:
The object exposes a writable attribute 'selected'. This is the setter.

setSizeHint

Signature: void setSizeHint (const QSize size)

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

Python specific notes:
The object exposes a writable attribute 'sizeHint'. This is the setter.

setStatusTip

Signature: void setStatusTip (string statusTip)

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

Python specific notes:
The object exposes a writable attribute 'statusTip'. This is the setter.

setText

Signature: void setText (string text)

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

Python specific notes:
The object exposes a writable attribute 'text'. This is the setter.

setTextAlignment

Signature: void setTextAlignment (int alignment)

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

Python specific notes:
The object exposes a writable attribute 'textAlignment'. This is the setter.

setTextColor

Signature: void setTextColor (const QColor color)

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

Python specific notes:
The object exposes a writable attribute 'textColor'. This is the setter.

setToolTip

Signature: void setToolTip (string toolTip)

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

Python specific notes:
The object exposes a writable attribute 'toolTip'. This is the setter.

setWhatsThis

Signature: void setWhatsThis (string whatsThis)

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

Python specific notes:
The object exposes a writable attribute 'whatsThis'. This is the setter.

sizeHint

Signature: [const] QSize sizeHint

Description: Method QSize QTableWidgetItem::sizeHint()

Python specific notes:
The object exposes a readable attribute 'sizeHint'. This is the getter.

sizeHint=

Signature: void sizeHint= (const QSize size)

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

Python specific notes:
The object exposes a writable attribute 'sizeHint'. This is the setter.

statusTip

Signature: [const] string statusTip

Description: Method QString QTableWidgetItem::statusTip()

Python specific notes:
The object exposes a readable attribute 'statusTip'. This is the getter.

statusTip=

Signature: void statusTip= (string statusTip)

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

Python specific notes:
The object exposes a writable attribute 'statusTip'. This is the setter.

tableWidget

Signature: [const] QTableWidget ptr tableWidget

Description: Method QTableWidget *QTableWidgetItem::tableWidget()

text

Signature: [const] string text

Description: Method QString QTableWidgetItem::text()

Python specific notes:
The object exposes a readable attribute 'text'. This is the getter.

text=

Signature: void text= (string text)

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

Python specific notes:
The object exposes a writable attribute 'text'. This is the setter.

textAlignment

Signature: [const] int textAlignment

Description: Method int QTableWidgetItem::textAlignment()

Python specific notes:
The object exposes a readable attribute 'textAlignment'. This is the getter.

textAlignment=

Signature: void textAlignment= (int alignment)

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

Python specific notes:
The object exposes a writable attribute 'textAlignment'. This is the setter.

textColor

Signature: [const] QColor textColor

Description: Method QColor QTableWidgetItem::textColor()

Python specific notes:
The object exposes a readable attribute 'textColor'. This is the getter.

textColor=

Signature: void textColor= (const QColor color)

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

Python specific notes:
The object exposes a writable attribute 'textColor'. This is the setter.

toolTip

Signature: [const] string toolTip

Description: Method QString QTableWidgetItem::toolTip()

Python specific notes:
The object exposes a readable attribute 'toolTip'. This is the getter.

toolTip=

Signature: void toolTip= (string toolTip)

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

Python specific notes:
The object exposes a writable attribute 'toolTip'. This is the setter.

type

Signature: [const] int type

Description: Method int QTableWidgetItem::type()

whatsThis

Signature: [const] string whatsThis

Description: Method QString QTableWidgetItem::whatsThis()

Python specific notes:
The object exposes a readable attribute 'whatsThis'. This is the getter.

whatsThis=

Signature: void whatsThis= (string whatsThis)

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

Python specific notes:
The object exposes a writable attribute 'whatsThis'. This is the setter.

write

Signature: [const] void write (QDataStream out)

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

This method can be reimplemented in a derived class.