#[repr(C)]pub struct QListWidgetItem { /* private fields */ }
Expand description
The QListWidgetItem class provides an item for use with the QListWidget item view class.
C++ class: QListWidgetItem
.
The QListWidgetItem class provides an item for use with the QListWidget item view class.
A QListWidgetItem represents a single item in a QListWidget. Each item can hold several pieces of information, and will display them 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 QListView class with a standard model.
List items can be inserted automatically into a list, when they are constructed, by specifying the list widget:
new QListWidgetItem(tr(“Hazel”), listWidget);
Alternatively, list items can also be created without a parent widget, and later inserted into a list using QListWidget::insertItem().
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. Tooltips, status tips and "What's This?" help can be added to list items with setToolTip(), setStatusTip(), and setWhatsThis().
By default, items are enabled, selectable, checkable, and can be the source of drag and drop operations.
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 the item's current check state.
The isHidden() function can be used to determine whether the item is hidden. To hide an item, use setHidden().
Implementations§
Source§impl QListWidgetItem
impl QListWidgetItem
Sourcepub unsafe fn background(&self) -> CppBox<QBrush>
pub unsafe fn background(&self) -> CppBox<QBrush>
Returns the brush used to display the list item's background.
Calls C++ function: QBrush QListWidgetItem::background() const
.
Returns the brush used to display the list item’s background.
This function was introduced in Qt 4.2.
See also setBackground() and foreground().
Sourcepub unsafe fn background_color(&self) -> CppBox<QColor>
pub unsafe fn background_color(&self) -> CppBox<QColor>
This function is deprecated. Use background() instead.
Calls C++ function: QColor QListWidgetItem::backgroundColor() const
.
This function is deprecated. Use background() instead.
See also setBackgroundColor().
Sourcepub unsafe fn check_state(&self) -> CheckState
pub unsafe fn check_state(&self) -> CheckState
Returns the checked state of the list item (see Qt::CheckState).
Calls C++ function: Qt::CheckState QListWidgetItem::checkState() const
.
Returns the checked state of the list item (see Qt::CheckState).
See also setCheckState() and flags().
Sourcepub unsafe fn clone(&self) -> Ptr<QListWidgetItem>
pub unsafe fn clone(&self) -> Ptr<QListWidgetItem>
Creates an exact copy of the item.
Calls C++ function: virtual QListWidgetItem* QListWidgetItem::clone() const
.
Creates an exact copy of the item.
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QListWidgetItem>>,
) -> Ref<QListWidgetItem>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QListWidgetItem>>, ) -> Ref<QListWidgetItem>
Assigns other's data and flags to this item. Note that type() and listWidget() are not copied.
Calls C++ function: QListWidgetItem& QListWidgetItem::operator=(const QListWidgetItem& other)
.
Assigns other’s data and flags to this item. Note that type() and listWidget() are not copied.
This function is useful when reimplementing clone().
Sourcepub unsafe fn data(&self, role: c_int) -> CppBox<QVariant>
pub unsafe fn data(&self, role: c_int) -> CppBox<QVariant>
Returns the item's data for a given role. Reimplement this function if you need extra roles or special behavior for certain roles.
Calls C++ function: virtual QVariant QListWidgetItem::data(int role) const
.
Returns the item’s data for a given role. Reimplement this function if you need extra roles or special behavior for certain roles.
See also Qt::ItemDataRole and setData().
Sourcepub unsafe fn flags(&self) -> QFlags<ItemFlag>
pub unsafe fn flags(&self) -> QFlags<ItemFlag>
Returns the item flags for this item (see Qt::ItemFlags).
Calls C++ function: QFlags<Qt::ItemFlag> QListWidgetItem::flags() const
.
Returns the item flags for this item (see Qt::ItemFlags).
See also setFlags().
Sourcepub unsafe fn font(&self) -> CppBox<QFont>
pub unsafe fn font(&self) -> CppBox<QFont>
Returns the font used to display this list item's text.
Calls C++ function: QFont QListWidgetItem::font() const
.
Returns the font used to display this list item’s text.
See also setFont().
Sourcepub unsafe fn foreground(&self) -> CppBox<QBrush>
pub unsafe fn foreground(&self) -> CppBox<QBrush>
Returns the brush used to display the list item's foreground (e.g. text).
Calls C++ function: QBrush QListWidgetItem::foreground() const
.
Returns the brush used to display the list item’s foreground (e.g. text).
This function was introduced in Qt 4.2.
See also setForeground() and background().
Sourcepub unsafe fn icon(&self) -> CppBox<QIcon>
pub unsafe fn icon(&self) -> CppBox<QIcon>
Returns the list item's icon.
Calls C++ function: QIcon QListWidgetItem::icon() const
.
Returns true
if the item is hidden; otherwise returns false
.
Calls C++ function: bool QListWidgetItem::isHidden() const
.
Returns true
if the item is hidden; otherwise returns false
.
This function was introduced in Qt 4.2.
See also setHidden().
Sourcepub unsafe fn is_selected(&self) -> bool
pub unsafe fn is_selected(&self) -> bool
Returns true
if the item is selected; otherwise returns false
.
Calls C++ function: bool QListWidgetItem::isSelected() const
.
Returns true
if the item is selected; otherwise returns false
.
This function was introduced in Qt 4.2.
See also setSelected().
Sourcepub unsafe fn list_widget(&self) -> QPtr<QListWidget>
pub unsafe fn list_widget(&self) -> QPtr<QListWidget>
Returns the list widget containing the item.
Calls C++ function: QListWidget* QListWidgetItem::listWidget() const
.
Returns the list widget containing the item.
Sourcepub unsafe fn from_q_list_widget_int(
view: impl CastInto<Ptr<QListWidget>>,
type_: c_int,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_list_widget_int( view: impl CastInto<Ptr<QListWidget>>, type_: c_int, ) -> CppBox<QListWidgetItem>
Constructs an empty list widget item of the specified type with the given parent. If parent is not specified, the item will need to be inserted into a list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(QListWidget* view = …, int type = …)
.
Constructs an empty list widget item of the specified type with the given parent. If parent is not specified, the item will need to be inserted into a list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_string_q_list_widget_int(
text: impl CastInto<Ref<QString>>,
view: impl CastInto<Ptr<QListWidget>>,
type_: c_int,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_string_q_list_widget_int( text: impl CastInto<Ref<QString>>, view: impl CastInto<Ptr<QListWidget>>, type_: c_int, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QString& text, QListWidget* view = …, int type = …)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_icon_q_string_q_list_widget_int(
icon: impl CastInto<Ref<QIcon>>,
text: impl CastInto<Ref<QString>>,
view: impl CastInto<Ptr<QListWidget>>,
type_: c_int,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_icon_q_string_q_list_widget_int( icon: impl CastInto<Ref<QIcon>>, text: impl CastInto<Ref<QString>>, view: impl CastInto<Ptr<QListWidget>>, type_: c_int, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view = …, int type = …)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn new() -> CppBox<QListWidgetItem>
pub unsafe fn new() -> CppBox<QListWidgetItem>
The QListWidgetItem class provides an item for use with the QListWidget item view class.
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem()
.
The QListWidgetItem class provides an item for use with the QListWidget item view class.
A QListWidgetItem represents a single item in a QListWidget. Each item can hold several pieces of information, and will display them 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 QListView class with a standard model.
List items can be inserted automatically into a list, when they are constructed, by specifying the list widget:
new QListWidgetItem(tr(“Hazel”), listWidget);
Alternatively, list items can also be created without a parent widget, and later inserted into a list using QListWidget::insertItem().
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. Tooltips, status tips and "What's This?" help can be added to list items with setToolTip(), setStatusTip(), and setWhatsThis().
By default, items are enabled, selectable, checkable, and can be the source of drag and drop operations.
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 the item's current check state.
The isHidden() function can be used to determine whether the item is hidden. To hide an item, use setHidden().
Sourcepub unsafe fn from_q_list_widget(
view: impl CastInto<Ptr<QListWidget>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_list_widget( view: impl CastInto<Ptr<QListWidget>>, ) -> CppBox<QListWidgetItem>
Constructs an empty list widget item of the specified type with the given parent. If parent is not specified, the item will need to be inserted into a list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(QListWidget* view = …)
.
Constructs an empty list widget item of the specified type with the given parent. If parent is not specified, the item will need to be inserted into a list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_string_q_list_widget(
text: impl CastInto<Ref<QString>>,
view: impl CastInto<Ptr<QListWidget>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_string_q_list_widget( text: impl CastInto<Ref<QString>>, view: impl CastInto<Ptr<QListWidget>>, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QString& text, QListWidget* view = …)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_string(
text: impl CastInto<Ref<QString>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_string( text: impl CastInto<Ref<QString>>, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QString& text)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_icon_q_string_q_list_widget(
icon: impl CastInto<Ref<QIcon>>,
text: impl CastInto<Ref<QString>>,
view: impl CastInto<Ptr<QListWidget>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_icon_q_string_q_list_widget( icon: impl CastInto<Ref<QIcon>>, text: impl CastInto<Ref<QString>>, view: impl CastInto<Ptr<QListWidget>>, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view = …)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn from_q_icon_q_string(
icon: impl CastInto<Ref<QIcon>>,
text: impl CastInto<Ref<QString>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn from_q_icon_q_string( icon: impl CastInto<Ref<QIcon>>, text: impl CastInto<Ref<QString>>, ) -> CppBox<QListWidgetItem>
Constructs an empty 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 list widget with QListWidget::insertItem().
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QIcon& icon, const QString& text)
.
Constructs an empty 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 list widget with QListWidget::insertItem().
This constructor inserts the item into the model of the parent that is passed to the constructor. If the model is sorted then the behavior of the insert is undetermined since the model will call the '<'
operator method on the item which, at this point, is not yet constructed. To avoid the undetermined behavior, we recommend not to specify the parent and use QListWidget::insertItem() instead.
See also type().
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QListWidgetItem>>,
) -> CppBox<QListWidgetItem>
pub unsafe fn new_copy( other: impl CastInto<Ref<QListWidgetItem>>, ) -> CppBox<QListWidgetItem>
Constructs a copy of other. Note that type() and listWidget() are not copied.
Calls C++ function: [constructor] void QListWidgetItem::QListWidgetItem(const QListWidgetItem& other)
.
Constructs a copy of other. Note that type() and listWidget() are not copied.
This function is useful when reimplementing clone().
This function was introduced in Qt 4.1.
Sourcepub unsafe fn read(&self, in_: impl CastInto<Ref<QDataStream>>)
pub unsafe fn read(&self, in_: impl CastInto<Ref<QDataStream>>)
Reads the item from stream in.
Calls C++ function: virtual void QListWidgetItem::read(QDataStream& in)
.
Reads the item from stream in.
See also write().
Sourcepub unsafe fn set_background(&self, brush: impl CastInto<Ref<QBrush>>)
pub unsafe fn set_background(&self, brush: impl CastInto<Ref<QBrush>>)
Sets the background brush of the list item to the given brush.
Calls C++ function: void QListWidgetItem::setBackground(const QBrush& brush)
.
Sets the background brush of the list item to the given brush.
This function was introduced in Qt 4.2.
See also background() and setForeground().
Sourcepub unsafe fn set_background_color(&self, color: impl CastInto<Ref<QColor>>)
pub unsafe fn set_background_color(&self, color: impl CastInto<Ref<QColor>>)
This function is deprecated. Use setBackground() instead.
Calls C++ function: virtual void QListWidgetItem::setBackgroundColor(const QColor& color)
.
This function is deprecated. Use setBackground() instead.
See also backgroundColor().
Sourcepub unsafe fn set_check_state(&self, state: CheckState)
pub unsafe fn set_check_state(&self, state: CheckState)
Sets the check state of the list item to state.
Calls C++ function: void QListWidgetItem::setCheckState(Qt::CheckState state)
.
Sets the check state of the list item to state.
See also checkState().
Sourcepub unsafe fn set_data(&self, role: c_int, value: impl CastInto<Ref<QVariant>>)
pub unsafe fn set_data(&self, role: c_int, value: impl CastInto<Ref<QVariant>>)
Sets the data for a given role to the given value. Reimplement this function if you need extra roles or special behavior for certain roles.
Calls C++ function: virtual void QListWidgetItem::setData(int role, const QVariant& value)
.
Sets the data for a given role to the given value. Reimplement this function if you need extra roles or special behavior for certain roles.
Note: The default implementation treats Qt::EditRole and Qt::DisplayRole as referring to the same data.
See also Qt::ItemDataRole and data().
Sourcepub unsafe fn set_flags(&self, flags: QFlags<ItemFlag>)
pub unsafe fn set_flags(&self, flags: QFlags<ItemFlag>)
Sets the item flags for the list item to flags.
Calls C++ function: void QListWidgetItem::setFlags(QFlags<Qt::ItemFlag> flags)
.
Sets the item flags for the list item to flags.
See also flags() and Qt::ItemFlags.
Sourcepub unsafe fn set_font(&self, font: impl CastInto<Ref<QFont>>)
pub unsafe fn set_font(&self, font: impl CastInto<Ref<QFont>>)
Sets the font used when painting the item to the given font.
Calls C++ function: void QListWidgetItem::setFont(const QFont& font)
.
Sets the font used when painting the item to the given font.
See also font().
Sourcepub unsafe fn set_foreground(&self, brush: impl CastInto<Ref<QBrush>>)
pub unsafe fn set_foreground(&self, brush: impl CastInto<Ref<QBrush>>)
Sets the foreground brush of the list item to the given brush.
Calls C++ function: void QListWidgetItem::setForeground(const QBrush& brush)
.
Sets the foreground brush of the list item to the given brush.
This function was introduced in Qt 4.2.
See also foreground() and setBackground().
Hides the item if hide is true; otherwise shows the item.
Calls C++ function: void QListWidgetItem::setHidden(bool hide)
.
Hides the item if hide is true; otherwise shows the item.
This function was introduced in Qt 4.2.
See also isHidden().
Sourcepub unsafe fn set_icon(&self, icon: impl CastInto<Ref<QIcon>>)
pub unsafe fn set_icon(&self, icon: impl CastInto<Ref<QIcon>>)
Sets the icon for the list item to the given icon.
Calls C++ function: void QListWidgetItem::setIcon(const QIcon& icon)
.
Sourcepub unsafe fn set_selected(&self, select: bool)
pub unsafe fn set_selected(&self, select: bool)
Sets the selected state of the item to select.
Calls C++ function: void QListWidgetItem::setSelected(bool select)
.
Sets the selected state of the item to select.
This function was introduced in Qt 4.2.
See also isSelected().
Sourcepub unsafe fn set_size_hint(&self, size: impl CastInto<Ref<QSize>>)
pub unsafe fn set_size_hint(&self, size: impl CastInto<Ref<QSize>>)
Sets the size hint for the list item to be size. If no size hint is set, the item delegate will compute the size hint based on the item data.
Calls C++ function: void QListWidgetItem::setSizeHint(const QSize& size)
.
Sets the size hint for the list item to be size. If no size hint is set, the item delegate will compute the size hint based on the item data.
This function was introduced in Qt 4.1.
See also sizeHint().
Sourcepub unsafe fn set_status_tip(&self, status_tip: impl CastInto<Ref<QString>>)
pub unsafe fn set_status_tip(&self, status_tip: impl CastInto<Ref<QString>>)
Sets the status tip for the list item to the text specified by statusTip. QListWidget mouseTracking needs to be enabled for this feature to work.
Calls C++ function: void QListWidgetItem::setStatusTip(const QString& statusTip)
.
Sets the status tip for the list item to the text specified by statusTip. QListWidget mouseTracking needs to be enabled for this feature to work.
See also statusTip(), setToolTip(), setWhatsThis(), and QWidget::setMouseTracking().
Sourcepub unsafe fn set_text(&self, text: impl CastInto<Ref<QString>>)
pub unsafe fn set_text(&self, text: impl CastInto<Ref<QString>>)
Sets the text for the list widget item's to the given text.
Calls C++ function: void QListWidgetItem::setText(const QString& text)
.
Sets the text for the list widget item’s to the given text.
See also text().
Sourcepub unsafe fn set_text_alignment(&self, alignment: c_int)
pub unsafe fn set_text_alignment(&self, alignment: c_int)
Sets the list item's text alignment to alignment.
Calls C++ function: void QListWidgetItem::setTextAlignment(int alignment)
.
Sets the list item’s text alignment to alignment.
See also textAlignment() and Qt::AlignmentFlag.
Sourcepub unsafe fn set_text_color(&self, color: impl CastInto<Ref<QColor>>)
pub unsafe fn set_text_color(&self, color: impl CastInto<Ref<QColor>>)
This function is deprecated. Use setForeground() instead.
Calls C++ function: void QListWidgetItem::setTextColor(const QColor& color)
.
This function is deprecated. Use setForeground() instead.
See also textColor().
Sourcepub unsafe fn set_tool_tip(&self, tool_tip: impl CastInto<Ref<QString>>)
pub unsafe fn set_tool_tip(&self, tool_tip: impl CastInto<Ref<QString>>)
Sets the tooltip for the list item to the text specified by toolTip.
Calls C++ function: void QListWidgetItem::setToolTip(const QString& toolTip)
.
Sets the tooltip for the list item to the text specified by toolTip.
See also toolTip(), setStatusTip(), and setWhatsThis().
Sourcepub unsafe fn set_whats_this(&self, whats_this: impl CastInto<Ref<QString>>)
pub unsafe fn set_whats_this(&self, whats_this: impl CastInto<Ref<QString>>)
Sets the "What's This?" help for the list item to the text specified by whatsThis.
Calls C++ function: void QListWidgetItem::setWhatsThis(const QString& whatsThis)
.
Sets the “What’s This?” help for the list item to the text specified by whatsThis.
See also whatsThis(), setStatusTip(), and setToolTip().
Sourcepub unsafe fn size_hint(&self) -> CppBox<QSize>
pub unsafe fn size_hint(&self) -> CppBox<QSize>
Returns the size hint set for the list item.
Calls C++ function: QSize QListWidgetItem::sizeHint() const
.
Returns the size hint set for the list item.
This function was introduced in Qt 4.1.
See also setSizeHint().
Sourcepub unsafe fn status_tip(&self) -> CppBox<QString>
pub unsafe fn status_tip(&self) -> CppBox<QString>
Returns the list item's status tip.
Calls C++ function: QString QListWidgetItem::statusTip() const
.
Returns the list item’s status tip.
See also setStatusTip().
Sourcepub unsafe fn text(&self) -> CppBox<QString>
pub unsafe fn text(&self) -> CppBox<QString>
Returns the list item's text.
Calls C++ function: QString QListWidgetItem::text() const
.
Returns the list item’s text.
See also setText().
Sourcepub unsafe fn text_alignment(&self) -> c_int
pub unsafe fn text_alignment(&self) -> c_int
Returns the text alignment for the list item.
Calls C++ function: int QListWidgetItem::textAlignment() const
.
Returns the text alignment for the list item.
See also setTextAlignment() and Qt::AlignmentFlag.
Sourcepub unsafe fn text_color(&self) -> CppBox<QColor>
pub unsafe fn text_color(&self) -> CppBox<QColor>
Returns the color used to display the list item's text.
Calls C++ function: QColor QListWidgetItem::textColor() const
.
Returns the color used to display the list item’s text.
This function is deprecated. Use foreground() instead.
See also setTextColor().
Sourcepub unsafe fn tool_tip(&self) -> CppBox<QString>
pub unsafe fn tool_tip(&self) -> CppBox<QString>
Returns the list item's tooltip.
Calls C++ function: QString QListWidgetItem::toolTip() const
.
Returns the list item’s tooltip.
See also setToolTip(), statusTip(), and whatsThis().
Sourcepub unsafe fn type_(&self) -> c_int
pub unsafe fn type_(&self) -> c_int
Returns the type passed to the QListWidgetItem constructor.
Calls C++ function: int QListWidgetItem::type() const
.
Returns the type passed to the QListWidgetItem constructor.
Sourcepub unsafe fn whats_this(&self) -> CppBox<QString>
pub unsafe fn whats_this(&self) -> CppBox<QString>
Returns the list item's "What's This?" help text.
Calls C++ function: QString QListWidgetItem::whatsThis() const
.
Returns the list item’s “What’s This?” help text.
See also setWhatsThis(), statusTip(), and toolTip().
Trait Implementations§
Source§impl CppDeletable for QListWidgetItem
impl CppDeletable for QListWidgetItem
Source§impl Lt<Ref<QListWidgetItem>> for QListWidgetItem
impl Lt<Ref<QListWidgetItem>> for QListWidgetItem
Source§unsafe fn lt(&self, other: &Ref<QListWidgetItem>) -> bool
unsafe fn lt(&self, other: &Ref<QListWidgetItem>) -> bool
Returns true
if this item's text is less then other item's text; otherwise returns false
.
Calls C++ function: virtual bool QListWidgetItem::operator<(const QListWidgetItem& other) const
.
Returns true
if this item’s text is less then other item’s text; otherwise returns false
.