[][src]Struct qt_widgets::QTreeWidget

#[repr(C)]pub struct QTreeWidget { /* fields omitted */ }

The QTreeWidget class provides a tree view that uses a predefined tree model.

C++ class: QTreeWidget.

C++ documentation:

The QTreeWidget class provides a tree view that uses a predefined tree model.

The QTreeWidget class is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the QListView class in Qt 3. This class is based on Qt's Model/View architecture and uses a default model to hold items, each of which is a QTreeWidgetItem.

Developers who do not need the flexibility of the Model/View framework can use this class to create simple hierarchical lists very easily. A more flexible approach involves combining a QTreeView with a standard item model. This allows the storage of data to be separated from its representation.

In its simplest form, a tree widget can be constructed in the following way:

QTreeWidget treeWidget = new QTreeWidget(); treeWidget->setColumnCount(1); QList<QTreeWidgetItem > items; for (int i = 0; i < 10; ++i) items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i)))); treeWidget->insertTopLevelItems(0, items);

Before items can be added to the tree widget, the number of columns must be set with setColumnCount(). This allows each item to have one or more labels or other decorations. The number of columns in use can be found with the columnCount() function.

The tree can have a header that contains a section for each column in the widget. It is easiest to set up the labels for each section by supplying a list of strings with setHeaderLabels(), but a custom header can be constructed with a QTreeWidgetItem and inserted into the tree with the setHeaderItem() function.

The items in the tree can be sorted by column according to a predefined sort order. If sorting is enabled, the user can sort the items by clicking on a column header. Sorting can be enabled or disabled by calling setSortingEnabled(). The isSortingEnabled() function indicates whether sorting is enabled.

Methods

impl QTreeWidget[src]

pub fn slot_scroll_to_item(
    &self
) -> Receiver<(*const QTreeWidgetItem, ScrollHint)>
[src]

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

Returns a built-in Qt slot QTreeWidget::scrollToItem that can be passed to qt_core::Signal::connect.

C++ documentation:

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

See also currentItem(), itemAt(), and topLevelItem().

pub fn slot_expand_item(&self) -> Receiver<(*const QTreeWidgetItem,)>[src]

Expands the item. This causes the tree containing the item's children to be expanded.

Returns a built-in Qt slot QTreeWidget::expandItem that can be passed to qt_core::Signal::connect.

C++ documentation:

Expands the item. This causes the tree containing the item's children to be expanded.

See also collapseItem(), currentItem(), itemAt(), topLevelItem(), and itemExpanded().

pub fn slot_collapse_item(&self) -> Receiver<(*const QTreeWidgetItem,)>[src]

Closes the item. This causes the tree containing the item's children to be collapsed.

Returns a built-in Qt slot QTreeWidget::collapseItem that can be passed to qt_core::Signal::connect.

C++ documentation:

Closes the item. This causes the tree containing the item's children to be collapsed.

See also expandItem(), currentItem(), itemAt(), and topLevelItem().

pub fn slot_clear(&self) -> Receiver<()>[src]

Clears the tree widget by removing all of its items and selections.

Returns a built-in Qt slot QTreeWidget::clear that can be passed to qt_core::Signal::connect.

C++ documentation:

Clears the tree widget by removing all of its items and selections.

Note: Since each item is removed from the tree widget before being deleted, the return value of QTreeWidgetItem::treeWidget() will be invalid when called from an item's destructor.

See also takeTopLevelItem(), topLevelItemCount(), and columnCount().

pub fn item_pressed(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the user presses a mouse button inside the widget.

Returns a built-in Qt signal QTreeWidget::itemPressed that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user presses a mouse button inside the widget.

The specified item is the item that was clicked, or 0 if no item was clicked. The column is the item's column that was clicked, or -1 if no item was clicked.

pub fn item_clicked(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the user clicks inside the widget.

Returns a built-in Qt signal QTreeWidget::itemClicked that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user clicks inside the widget.

The specified item is the item that was clicked. The column is the item's column that was clicked. If no item was clicked, no signal will be emitted.

pub fn item_double_clicked(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the user double clicks inside the widget.

Returns a built-in Qt signal QTreeWidget::itemDoubleClicked that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user double clicks inside the widget.

The specified item is the item that was clicked, or 0 if no item was clicked. The column is the item's column that was clicked. If no item was double clicked, no signal will be emitted.

pub fn item_activated(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the user activates an item by single- or double-clicking (depending on the platform, i.e. on the QStyle::SH_ItemView_ActivateItemOnSingleClick style hint) or pressing a special key (e.g., Enter).

Returns a built-in Qt signal QTreeWidget::itemActivated that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user activates an item by single- or double-clicking (depending on the platform, i.e. on the QStyle::SH_ItemView_ActivateItemOnSingleClick style hint) or pressing a special key (e.g., Enter).

The specified item is the item that was clicked, or 0 if no item was clicked. The column is the item's column that was clicked, or -1 if no item was clicked.

pub fn item_entered(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the mouse cursor enters an item over the specified column. QTreeWidget mouse tracking needs to be enabled for this feature to work.

Returns a built-in Qt signal QTreeWidget::itemEntered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the mouse cursor enters an item over the specified column. QTreeWidget mouse tracking needs to be enabled for this feature to work.

pub fn item_changed(&self) -> Signal<(*mut QTreeWidgetItem, c_int)>[src]

This signal is emitted when the contents of the column in the specified item changes.

Returns a built-in Qt signal QTreeWidget::itemChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the contents of the column in the specified item changes.

pub fn item_expanded(&self) -> Signal<(*mut QTreeWidgetItem,)>[src]

This signal is emitted when the specified item is expanded so that all of its children are displayed.

Returns a built-in Qt signal QTreeWidget::itemExpanded that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the specified item is expanded so that all of its children are displayed.

Note: This signal will not be emitted if an item changes its state when expandAll() is invoked.

See also setItemExpanded(), QTreeWidgetItem::isExpanded(), itemCollapsed(), and expandItem().

pub fn item_collapsed(&self) -> Signal<(*mut QTreeWidgetItem,)>[src]

This signal is emitted when the specified item is collapsed so that none of its children are displayed.

Returns a built-in Qt signal QTreeWidget::itemCollapsed that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the specified item is collapsed so that none of its children are displayed.

Note: This signal will not be emitted if an item changes its state when collapseAll() is invoked.

See also QTreeWidgetItem::isExpanded(), itemExpanded(), and collapseItem().

pub fn current_item_changed(
    &self
) -> Signal<(*mut QTreeWidgetItem, *mut QTreeWidgetItem)>
[src]

This signal is emitted when the current item changes. The current item is specified by current, and this replaces the previous current item.

Returns a built-in Qt signal QTreeWidget::currentItemChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the current item changes. The current item is specified by current, and this replaces the previous current item.

See also setCurrentItem().

pub fn item_selection_changed(&self) -> Signal<()>[src]

This signal is emitted when the selection changes in the tree widget. The current selection can be found with selectedItems().

Returns a built-in Qt signal QTreeWidget::itemSelectionChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the selection changes in the tree widget. The current selection can be found with selectedItems().

pub unsafe fn add_top_level_item(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Appends the item as a top-level item in the widget.

Calls C++ function: void QTreeWidget::addTopLevelItem(QTreeWidgetItem* item).

C++ documentation:

Appends the item as a top-level item in the widget.

This function was introduced in Qt 4.1.

See also insertTopLevelItem().

pub unsafe fn add_top_level_items(
    &self,
    items: impl CastInto<Ref<QListOfQTreeWidgetItem>>
)
[src]

Appends the list of items as a top-level items in the widget.

Calls C++ function: void QTreeWidget::addTopLevelItems(const QList<QTreeWidgetItem*>& items).

C++ documentation:

Appends the list of items as a top-level items in the widget.

See also insertTopLevelItems().

pub unsafe fn clear(&self)[src]

Clears the tree widget by removing all of its items and selections.

Calls C++ function: [slot] void QTreeWidget::clear().

C++ documentation:

Clears the tree widget by removing all of its items and selections.

Note: Since each item is removed from the tree widget before being deleted, the return value of QTreeWidgetItem::treeWidget() will be invalid when called from an item's destructor.

See also takeTopLevelItem(), topLevelItemCount(), and columnCount().

pub unsafe fn close_persistent_editor_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
)
[src]

Closes the persistent editor for the item in the given column.

Calls C++ function: void QTreeWidget::closePersistentEditor(QTreeWidgetItem* item, int column = …).

C++ documentation:

Closes the persistent editor for the item in the given column.

This function has no effect if no persistent editor is open for this combination of item and column.

See also openPersistentEditor().

pub unsafe fn close_persistent_editor_1a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Closes the persistent editor for the item in the given column.

Calls C++ function: void QTreeWidget::closePersistentEditor(QTreeWidgetItem* item).

C++ documentation:

Closes the persistent editor for the item in the given column.

This function has no effect if no persistent editor is open for this combination of item and column.

See also openPersistentEditor().

pub unsafe fn collapse_item(&self, item: impl CastInto<Ptr<QTreeWidgetItem>>)[src]

Closes the item. This causes the tree containing the item's children to be collapsed.

Calls C++ function: [slot] void QTreeWidget::collapseItem(const QTreeWidgetItem* item).

C++ documentation:

Closes the item. This causes the tree containing the item's children to be collapsed.

See also expandItem(), currentItem(), itemAt(), and topLevelItem().

pub unsafe fn column_count(&self) -> c_int[src]

This property holds the number of columns displayed in the tree widget

Calls C++ function: int QTreeWidget::columnCount() const.

C++ documentation:

This property holds the number of columns displayed in the tree widget

By default, this property has a value of 1.

Access functions:

int columnCount() const
void setColumnCount(int columns)

pub unsafe fn current_column(&self) -> c_int[src]

Returns the current column in the tree widget.

Calls C++ function: int QTreeWidget::currentColumn() const.

C++ documentation:

Returns the current column in the tree widget.

This function was introduced in Qt 4.1.

See also setCurrentItem() and columnCount().

pub unsafe fn current_item(&self) -> Ptr<QTreeWidgetItem>[src]

Returns the current item in the tree widget.

Calls C++ function: QTreeWidgetItem* QTreeWidget::currentItem() const.

C++ documentation:

Returns the current item in the tree widget.

See also setCurrentItem() and currentItemChanged().

pub unsafe fn edit_item_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
)
[src]

Starts editing the item in the given column if it is editable.

Calls C++ function: void QTreeWidget::editItem(QTreeWidgetItem* item, int column = …).

C++ documentation:

Starts editing the item in the given column if it is editable.

pub unsafe fn edit_item_1a(&self, item: impl CastInto<Ptr<QTreeWidgetItem>>)[src]

Starts editing the item in the given column if it is editable.

Calls C++ function: void QTreeWidget::editItem(QTreeWidgetItem* item).

C++ documentation:

Starts editing the item in the given column if it is editable.

pub unsafe fn expand_item(&self, item: impl CastInto<Ptr<QTreeWidgetItem>>)[src]

Expands the item. This causes the tree containing the item's children to be expanded.

Calls C++ function: [slot] void QTreeWidget::expandItem(const QTreeWidgetItem* item).

C++ documentation:

Expands the item. This causes the tree containing the item's children to be expanded.

See also collapseItem(), currentItem(), itemAt(), topLevelItem(), and itemExpanded().

pub unsafe fn find_items_3a(
    &self,
    text: impl CastInto<Ref<QString>>,
    flags: QFlags<MatchFlag>,
    column: c_int
) -> CppBox<QListOfQTreeWidgetItem>
[src]

Returns a list of items that match the given text, using the given flags, in the given column.

Calls C++ function: QList<QTreeWidgetItem*> QTreeWidget::findItems(const QString& text, QFlags<Qt::MatchFlag> flags, int column = …) const.

C++ documentation:

Returns a list of items that match the given text, using the given flags, in the given column.

pub unsafe fn find_items_2a(
    &self,
    text: impl CastInto<Ref<QString>>,
    flags: QFlags<MatchFlag>
) -> CppBox<QListOfQTreeWidgetItem>
[src]

Returns a list of items that match the given text, using the given flags, in the given column.

Calls C++ function: QList<QTreeWidgetItem*> QTreeWidget::findItems(const QString& text, QFlags<Qt::MatchFlag> flags) const.

C++ documentation:

Returns a list of items that match the given text, using the given flags, in the given column.

pub unsafe fn header_item(&self) -> Ptr<QTreeWidgetItem>[src]

Returns the item used for the tree widget's header.

Calls C++ function: QTreeWidgetItem* QTreeWidget::headerItem() const.

C++ documentation:

Returns the item used for the tree widget's header.

See also setHeaderItem().

pub unsafe fn index_of_top_level_item(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> c_int
[src]

Returns the index of the given top-level item, or -1 if the item cannot be found.

Calls C++ function: int QTreeWidget::indexOfTopLevelItem(QTreeWidgetItem* item) const.

C++ documentation:

Returns the index of the given top-level item, or -1 if the item cannot be found.

See also sortItems() and topLevelItemCount().

pub unsafe fn insert_top_level_item(
    &self,
    index: c_int,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Inserts the item at index in the top level in the view.

Calls C++ function: void QTreeWidget::insertTopLevelItem(int index, QTreeWidgetItem* item).

C++ documentation:

Inserts the item at index in the top level in the view.

If the item has already been inserted somewhere else it won't be inserted.

See also addTopLevelItem() and columnCount().

pub unsafe fn insert_top_level_items(
    &self,
    index: c_int,
    items: impl CastInto<Ref<QListOfQTreeWidgetItem>>
)
[src]

Inserts the list of items at index in the top level in the view.

Calls C++ function: void QTreeWidget::insertTopLevelItems(int index, const QList<QTreeWidgetItem*>& items).

C++ documentation:

Inserts the list of items at index in the top level in the view.

Items that have already been inserted somewhere else won't be inserted.

This function was introduced in Qt 4.1.

See also addTopLevelItems().

pub unsafe fn invisible_root_item(&self) -> Ptr<QTreeWidgetItem>[src]

Returns the tree widget's invisible root item.

Calls C++ function: QTreeWidgetItem* QTreeWidget::invisibleRootItem() const.

C++ documentation:

Returns the tree widget's invisible root item.

The invisible root item provides access to the tree widget's top-level items through the QTreeWidgetItem API, making it possible to write functions that can treat top-level items and their children in a uniform way; for example, recursive functions.

This function was introduced in Qt 4.2.

pub unsafe fn is_first_item_column_spanned(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> bool
[src]

Returns true if the given item is set to show only one section over all columns; otherwise returns false.

Calls C++ function: bool QTreeWidget::isFirstItemColumnSpanned(const QTreeWidgetItem* item) const.

C++ documentation:

Returns true if the given item is set to show only one section over all columns; otherwise returns false.

This function was introduced in Qt 4.3.

See also setFirstItemColumnSpanned().

pub unsafe fn is_item_expanded(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> bool
[src]

Returns true if the given item is open; otherwise returns false.

Calls C++ function: bool QTreeWidget::isItemExpanded(const QTreeWidgetItem* item) const.

C++ documentation:

Returns true if the given item is open; otherwise returns false.

This function is deprecated. Use QTreeWidgetItem::isExpanded() instead.

See also itemExpanded().

pub unsafe fn is_item_hidden(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> bool
[src]

Returns true if the item is explicitly hidden, otherwise returns false.

Calls C++ function: bool QTreeWidget::isItemHidden(const QTreeWidgetItem* item) const.

C++ documentation:

Returns true if the item is explicitly hidden, otherwise returns false.

This function is deprecated. Use QTreeWidgetItem::isHidden() instead.

pub unsafe fn is_item_selected(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> bool
[src]

Returns true if the item is selected; otherwise returns false.

Calls C++ function: bool QTreeWidget::isItemSelected(const QTreeWidgetItem* item) const.

C++ documentation:

Returns true if the item is selected; otherwise returns false.

This function is deprecated. Use QTreeWidgetItem::isSelected() instead.

See also itemSelectionChanged().

pub unsafe fn is_persistent_editor_open_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
) -> bool
[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns whether a persistent editor is open for item item in column column.

Calls C++ function: bool QTreeWidget::isPersistentEditorOpen(QTreeWidgetItem* item, int column = …) const.

C++ documentation:

Returns whether a persistent editor is open for item item in column column.

This function was introduced in Qt 5.10.

See also openPersistentEditor() and closePersistentEditor().

pub unsafe fn is_persistent_editor_open_1a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> bool
[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns whether a persistent editor is open for item item in column column.

Calls C++ function: bool QTreeWidget::isPersistentEditorOpen(QTreeWidgetItem* item) const.

C++ documentation:

Returns whether a persistent editor is open for item item in column column.

This function was introduced in Qt 5.10.

See also openPersistentEditor() and closePersistentEditor().

pub unsafe fn item_above(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> Ptr<QTreeWidgetItem>
[src]

Returns the item above the given item.

Calls C++ function: QTreeWidgetItem* QTreeWidget::itemAbove(const QTreeWidgetItem* item) const.

C++ documentation:

Returns the item above the given item.

This function was introduced in Qt 4.3.

pub unsafe fn item_at_1a(
    &self,
    p: impl CastInto<Ref<QPoint>>
) -> Ptr<QTreeWidgetItem>
[src]

Returns a pointer to the item at the coordinates p. The coordinates are relative to the tree widget's viewport().

Calls C++ function: QTreeWidgetItem* QTreeWidget::itemAt(const QPoint& p) const.

C++ documentation:

Returns a pointer to the item at the coordinates p. The coordinates are relative to the tree widget's viewport().

See also visualItemRect().

pub unsafe fn item_at_2a(&self, x: c_int, y: c_int) -> Ptr<QTreeWidgetItem>[src]

This is an overloaded function.

Calls C++ function: QTreeWidgetItem* QTreeWidget::itemAt(int x, int y) const.

C++ documentation:

This is an overloaded function.

Returns a pointer to the item at the coordinates (x, y). The coordinates are relative to the tree widget's viewport().

pub unsafe fn item_below(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> Ptr<QTreeWidgetItem>
[src]

Returns the item visually below the given item.

Calls C++ function: QTreeWidgetItem* QTreeWidget::itemBelow(const QTreeWidgetItem* item) const.

C++ documentation:

Returns the item visually below the given item.

This function was introduced in Qt 4.3.

pub unsafe fn item_widget(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
) -> QPtr<QWidget>
[src]

Returns the widget displayed in the cell specified by item and the given column.

Calls C++ function: QWidget* QTreeWidget::itemWidget(QTreeWidgetItem* item, int column) const.

C++ documentation:

Returns the widget displayed in the cell specified by item and the given column.

This function was introduced in Qt 4.1.

See also setItemWidget().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QTreeWidget::metaObject() const.

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QWidget>>) -> QBox<QTreeWidget>[src]

Constructs a tree widget with the given parent.

Calls C++ function: [constructor] void QTreeWidget::QTreeWidget(QWidget* parent = …).

C++ documentation:

Constructs a tree widget with the given parent.

pub unsafe fn new_0a() -> QBox<QTreeWidget>[src]

The QTreeWidget class provides a tree view that uses a predefined tree model.

Calls C++ function: [constructor] void QTreeWidget::QTreeWidget().

C++ documentation:

The QTreeWidget class provides a tree view that uses a predefined tree model.

The QTreeWidget class is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the QListView class in Qt 3. This class is based on Qt's Model/View architecture and uses a default model to hold items, each of which is a QTreeWidgetItem.

Developers who do not need the flexibility of the Model/View framework can use this class to create simple hierarchical lists very easily. A more flexible approach involves combining a QTreeView with a standard item model. This allows the storage of data to be separated from its representation.

In its simplest form, a tree widget can be constructed in the following way:

QTreeWidget treeWidget = new QTreeWidget(); treeWidget->setColumnCount(1); QList<QTreeWidgetItem > items; for (int i = 0; i < 10; ++i) items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i)))); treeWidget->insertTopLevelItems(0, items);

Before items can be added to the tree widget, the number of columns must be set with setColumnCount(). This allows each item to have one or more labels or other decorations. The number of columns in use can be found with the columnCount() function.

The tree can have a header that contains a section for each column in the widget. It is easiest to set up the labels for each section by supplying a list of strings with setHeaderLabels(), but a custom header can be constructed with a QTreeWidgetItem and inserted into the tree with the setHeaderItem() function.

The items in the tree can be sorted by column according to a predefined sort order. If sorting is enabled, the user can sort the items by clicking on a column header. Sorting can be enabled or disabled by calling setSortingEnabled(). The isSortingEnabled() function indicates whether sorting is enabled.

pub unsafe fn open_persistent_editor_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
)
[src]

Opens a persistent editor for the item in the given column.

Calls C++ function: void QTreeWidget::openPersistentEditor(QTreeWidgetItem* item, int column = …).

C++ documentation:

Opens a persistent editor for the item in the given column.

See also closePersistentEditor().

pub unsafe fn open_persistent_editor_1a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Opens a persistent editor for the item in the given column.

Calls C++ function: void QTreeWidget::openPersistentEditor(QTreeWidgetItem* item).

C++ documentation:

Opens a persistent editor for the item in the given column.

See also closePersistentEditor().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QTreeWidget::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QTreeWidget::qt_metacast(const char* arg1).

pub unsafe fn remove_item_widget(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
)
[src]

Removes the widget set in the given item in the given column.

Calls C++ function: void QTreeWidget::removeItemWidget(QTreeWidgetItem* item, int column).

C++ documentation:

Removes the widget set in the given item in the given column.

This function was introduced in Qt 4.3.

pub unsafe fn scroll_to_item_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    hint: ScrollHint
)
[src]

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

Calls C++ function: [slot] void QTreeWidget::scrollToItem(const QTreeWidgetItem* item, QAbstractItemView::ScrollHint hint = …).

C++ documentation:

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

See also currentItem(), itemAt(), and topLevelItem().

pub unsafe fn scroll_to_item_1a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

Calls C++ function: [slot] void QTreeWidget::scrollToItem(const QTreeWidgetItem* item).

C++ documentation:

Ensures that the item is visible, scrolling the view if necessary using the specified hint.

See also currentItem(), itemAt(), and topLevelItem().

pub unsafe fn selected_items(&self) -> CppBox<QListOfQTreeWidgetItem>[src]

Returns a list of all selected non-hidden items.

Calls C++ function: QList<QTreeWidgetItem*> QTreeWidget::selectedItems() const.

C++ documentation:

Returns a list of all selected non-hidden items.

See also itemSelectionChanged().

pub unsafe fn set_column_count(&self, columns: c_int)[src]

This property holds the number of columns displayed in the tree widget

Calls C++ function: void QTreeWidget::setColumnCount(int columns).

C++ documentation:

This property holds the number of columns displayed in the tree widget

By default, this property has a value of 1.

Access functions:

int columnCount() const
void setColumnCount(int columns)

pub unsafe fn set_current_item_1a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
)
[src]

Sets the current item in the tree widget.

Calls C++ function: void QTreeWidget::setCurrentItem(QTreeWidgetItem* item).

C++ documentation:

Sets the current item in the tree widget.

Unless the selection mode is NoSelection, the item is also selected.

See also currentItem() and currentItemChanged().

pub unsafe fn set_current_item_2a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int
)
[src]

Sets the current item in the tree widget and the current column to column.

Calls C++ function: void QTreeWidget::setCurrentItem(QTreeWidgetItem* item, int column).

C++ documentation:

Sets the current item in the tree widget and the current column to column.

This function was introduced in Qt 4.1.

See also currentItem().

pub unsafe fn set_current_item_3a(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int,
    command: QFlags<SelectionFlag>
)
[src]

Sets the current item in the tree widget and the current column to column, using the given command.

Calls C++ function: void QTreeWidget::setCurrentItem(QTreeWidgetItem* item, int column, QFlags<QItemSelectionModel::SelectionFlag> command).

C++ documentation:

Sets the current item in the tree widget and the current column to column, using the given command.

This function was introduced in Qt 4.4.

See also currentItem().

pub unsafe fn set_first_item_column_spanned(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    span: bool
)
[src]

Sets the given item to only show one section for all columns if span is true; otherwise the item will show one section per column.

Calls C++ function: void QTreeWidget::setFirstItemColumnSpanned(const QTreeWidgetItem* item, bool span).

C++ documentation:

Sets the given item to only show one section for all columns if span is true; otherwise the item will show one section per column.

This function was introduced in Qt 4.3.

See also isFirstItemColumnSpanned().

pub unsafe fn set_header_item(&self, item: impl CastInto<Ptr<QTreeWidgetItem>>)[src]

Sets the header item for the tree widget. The label for each column in the header is supplied by the corresponding label in the item.

Calls C++ function: void QTreeWidget::setHeaderItem(QTreeWidgetItem* item).

C++ documentation:

Sets the header item for the tree widget. The label for each column in the header is supplied by the corresponding label in the item.

The tree widget takes ownership of the item.

See also headerItem() and setHeaderLabels().

pub unsafe fn set_header_label(&self, label: impl CastInto<Ref<QString>>)[src]

Same as setHeaderLabels(QStringList(label)).

Calls C++ function: void QTreeWidget::setHeaderLabel(const QString& label).

C++ documentation:

Same as setHeaderLabels(QStringList(label)).

This function was introduced in Qt 4.2.

pub unsafe fn set_header_labels(&self, labels: impl CastInto<Ref<QStringList>>)[src]

Adds a column in the header for each item in the labels list, and sets the label for each column.

Calls C++ function: void QTreeWidget::setHeaderLabels(const QStringList& labels).

C++ documentation:

Adds a column in the header for each item in the labels list, and sets the label for each column.

Note that setHeaderLabels() won't remove existing columns.

See also setHeaderItem() and setHeaderLabel().

pub unsafe fn set_item_expanded(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    expand: bool
)
[src]

Sets the item referred to by item to either closed or opened, depending on the value of expand.

Calls C++ function: void QTreeWidget::setItemExpanded(const QTreeWidgetItem* item, bool expand).

C++ documentation:

Sets the item referred to by item to either closed or opened, depending on the value of expand.

This function is deprecated. Use QTreeWidgetItem::setExpanded() instead.

See also expandItem(), collapseItem(), and itemExpanded().

pub unsafe fn set_item_hidden(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    hide: bool
)
[src]

Hides the given item if hide is true; otherwise shows the item.

Calls C++ function: void QTreeWidget::setItemHidden(const QTreeWidgetItem* item, bool hide).

C++ documentation:

Hides the given item if hide is true; otherwise shows the item.

This function is deprecated. Use QTreeWidgetItem::setHidden() instead.

See also isItemHidden() and itemChanged().

pub unsafe fn set_item_selected(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    select: bool
)
[src]

If select is true, the given item is selected; otherwise it is deselected.

Calls C++ function: void QTreeWidget::setItemSelected(const QTreeWidgetItem* item, bool select).

C++ documentation:

If select is true, the given item is selected; otherwise it is deselected.

This function is deprecated. Use QTreeWidgetItem::setSelected() instead.

See also isItemSelected() and itemSelectionChanged().

pub unsafe fn set_item_widget(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    column: c_int,
    widget: impl CastInto<Ptr<QWidget>>
)
[src]

Sets the given widget to be displayed in the cell specified by the given item and column.

Calls C++ function: void QTreeWidget::setItemWidget(QTreeWidgetItem* item, int column, QWidget* widget).

C++ documentation:

Sets the given widget to be displayed in the cell specified by the given item and column.

The given widget's autoFillBackground property must be set to true, otherwise the widget's background will be transparent, showing both the model data and the tree widget item.

This function should only be used to display static content in the place of a tree widget item. If you want to display custom dynamic content or implement a custom editor widget, use QTreeView and subclass QItemDelegate instead.

This function cannot be called before the item hierarchy has been set up, i.e., the QTreeWidgetItem that will hold widget must have been added to the view before widget is set.

Note: The tree takes ownership of the widget.

This function was introduced in Qt 4.1.

See also itemWidget() and Delegate Classes.

pub unsafe fn set_selection_model(
    &self,
    selection_model: impl CastInto<Ptr<QItemSelectionModel>>
)
[src]

Reimplemented from QAbstractItemView::setSelectionModel().

Calls C++ function: virtual void QTreeWidget::setSelectionModel(QItemSelectionModel* selectionModel).

C++ documentation:

Reimplemented from QAbstractItemView::setSelectionModel().

pub unsafe fn sort_column(&self) -> c_int[src]

Returns the column used to sort the contents of the widget.

Calls C++ function: int QTreeWidget::sortColumn() const.

C++ documentation:

Returns the column used to sort the contents of the widget.

This function was introduced in Qt 4.1.

See also sortItems().

pub unsafe fn sort_items(&self, column: c_int, order: SortOrder)[src]

Sorts the items in the widget in the specified order by the values in the given column.

Calls C++ function: void QTreeWidget::sortItems(int column, Qt::SortOrder order).

C++ documentation:

Sorts the items in the widget in the specified order by the values in the given column.

See also sortColumn().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn take_top_level_item(&self, index: c_int) -> Ptr<QTreeWidgetItem>[src]

Removes the top-level item at the given index in the tree and returns it, otherwise returns 0;

Calls C++ function: QTreeWidgetItem* QTreeWidget::takeTopLevelItem(int index).

C++ documentation:

Removes the top-level item at the given index in the tree and returns it, otherwise returns 0;

See also insertTopLevelItem(), topLevelItem(), and topLevelItemCount().

pub unsafe fn top_level_item(&self, index: c_int) -> Ptr<QTreeWidgetItem>[src]

Returns the top level item at the given index, or 0 if the item does not exist.

Calls C++ function: QTreeWidgetItem* QTreeWidget::topLevelItem(int index) const.

C++ documentation:

Returns the top level item at the given index, or 0 if the item does not exist.

See also topLevelItemCount() and insertTopLevelItem().

pub unsafe fn top_level_item_count(&self) -> c_int[src]

This property holds the number of top-level items

Calls C++ function: int QTreeWidget::topLevelItemCount() const.

C++ documentation:

This property holds the number of top-level items

By default, this property has a value of 0.

Access functions:

int topLevelItemCount() const

See also columnCount() and currentItem().

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QTreeWidget::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QTreeWidget::trUtf8(const char* s, const char* c, int n).

pub unsafe fn visual_item_rect(
    &self,
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> CppBox<QRect>
[src]

Returns the rectangle on the viewport occupied by the item at item.

Calls C++ function: QRect QTreeWidget::visualItemRect(const QTreeWidgetItem* item) const.

C++ documentation:

Returns the rectangle on the viewport occupied by the item at item.

See also itemAt().

Methods from Deref<Target = QTreeView>

pub fn expanded(&self) -> Signal<(*const QModelIndex,)>[src]

This signal is emitted when the item specified by index is expanded.

Returns a built-in Qt signal QTreeView::expanded that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the item specified by index is expanded.

See also setExpanded().

pub fn collapsed(&self) -> Signal<(*const QModelIndex,)>[src]

This signal is emitted when the item specified by index is collapsed.

Returns a built-in Qt signal QTreeView::collapsed that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the item specified by index is collapsed.

pub fn slot_hide_column(&self) -> Receiver<(c_int,)>[src]

Hides the column given.

Returns a built-in Qt slot QTreeView::hideColumn that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the column given.

Note: This function should only be called after the model has been initialized, as the view needs to know the number of columns in order to hide column.

See also showColumn() and setColumnHidden().

pub fn slot_show_column(&self) -> Receiver<(c_int,)>[src]

Shows the given column in the tree view.

Returns a built-in Qt slot QTreeView::showColumn that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the given column in the tree view.

See also hideColumn() and setColumnHidden().

pub fn slot_expand(&self) -> Receiver<(*const QModelIndex,)>[src]

Expands the model item specified by the index.

Returns a built-in Qt slot QTreeView::expand that can be passed to qt_core::Signal::connect.

C++ documentation:

Expands the model item specified by the index.

See also expanded().

pub fn slot_collapse(&self) -> Receiver<(*const QModelIndex,)>[src]

Collapses the model item specified by the index.

Returns a built-in Qt slot QTreeView::collapse that can be passed to qt_core::Signal::connect.

C++ documentation:

Collapses the model item specified by the index.

See also collapsed().

pub fn slot_resize_column_to_contents(&self) -> Receiver<(c_int,)>[src]

Resizes the column given to the size of its contents.

Returns a built-in Qt slot QTreeView::resizeColumnToContents that can be passed to qt_core::Signal::connect.

C++ documentation:

Resizes the column given to the size of its contents.

See also columnWidth(), setColumnWidth(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

pub fn slot_sort_by_column(&self) -> Receiver<(c_int,)>[src]

Sets the model up for sorting by the values in the given column and order.

Returns a built-in Qt slot QTreeView::sortByColumn that can be passed to qt_core::Signal::connect.

Warning: no exact match found in C++ documentation. Below is the C++ documentation for void QTreeView::sortByColumn(int column, Qt::SortOrder order):

Sets the model up for sorting by the values in the given column and order.

column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.

This function was introduced in Qt 4.2.

See also sortingEnabled.

pub fn slot_expand_all(&self) -> Receiver<()>[src]

Expands all expandable items.

Returns a built-in Qt slot QTreeView::expandAll that can be passed to qt_core::Signal::connect.

C++ documentation:

Expands all expandable items.

Warning: if the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 4.2.

See also collapseAll(), expand(), collapse(), and setExpanded().

pub fn slot_collapse_all(&self) -> Receiver<()>[src]

Collapses all expanded items.

Returns a built-in Qt slot QTreeView::collapseAll that can be passed to qt_core::Signal::connect.

C++ documentation:

Collapses all expanded items.

This function was introduced in Qt 4.2.

See also expandAll(), expand(), collapse(), and setExpanded().

pub fn slot_expand_to_depth(&self) -> Receiver<(c_int,)>[src]

Expands all expandable items to the given depth.

Returns a built-in Qt slot QTreeView::expandToDepth that can be passed to qt_core::Signal::connect.

C++ documentation:

Expands all expandable items to the given depth.

This function was introduced in Qt 4.3.

See also expandAll(), collapseAll(), expand(), collapse(), and setExpanded().

pub fn slot_column_resized(&self) -> Receiver<(c_int, c_int, c_int)>[src]

This function is called whenever column's size is changed in the header. oldSize and newSize give the previous size and the new size in pixels.

Returns a built-in Qt slot QTreeView::columnResized that can be passed to qt_core::Signal::connect.

C++ documentation:

This function is called whenever column's size is changed in the header. oldSize and newSize give the previous size and the new size in pixels.

See also setColumnWidth().

pub fn slot_column_count_changed(&self) -> Receiver<(c_int, c_int)>[src]

Informs the tree view that the number of columns in the tree view has changed from oldCount to newCount.

Returns a built-in Qt slot QTreeView::columnCountChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Informs the tree view that the number of columns in the tree view has changed from oldCount to newCount.

pub fn slot_column_moved(&self) -> Receiver<()>[src]

This slot is called whenever a column has been moved.

Returns a built-in Qt slot QTreeView::columnMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This slot is called whenever a column has been moved.

pub fn slot_reexpand(&self) -> Receiver<()>[src]

Returns a built-in Qt slot QTreeView::reexpand that can be passed to qt_core::Signal::connect.

pub fn slot_rows_removed(&self) -> Receiver<(*const QModelIndex, c_int, c_int)>[src]

Informs the view that the rows from the start row to the end row inclusive have been removed from the given parent model item.

Returns a built-in Qt slot QTreeView::rowsRemoved that can be passed to qt_core::Signal::connect.

C++ documentation:

Informs the view that the rows from the start row to the end row inclusive have been removed from the given parent model item.

This function was introduced in Qt 4.1.

pub unsafe fn all_columns_show_focus(&self) -> bool[src]

This property holds whether items should show keyboard focus using all columns

Calls C++ function: bool QTreeView::allColumnsShowFocus() const.

C++ documentation:

This property holds whether items should show keyboard focus using all columns

If this property is true all columns will show focus, otherwise only one column will show focus.

The default is false.

This property was introduced in Qt 4.2.

Access functions:

bool allColumnsShowFocus() const
void setAllColumnsShowFocus(bool enable)

pub unsafe fn auto_expand_delay(&self) -> c_int[src]

This property holds the delay time before items in a tree are opened during a drag and drop operation.

Calls C++ function: int QTreeView::autoExpandDelay() const.

C++ documentation:

This property holds the delay time before items in a tree are opened during a drag and drop operation.

This property holds the amount of time in milliseconds that the user must wait over a node before that node will automatically open or close. If the time is set to less then 0 then it will not be activated.

By default, this property has a value of -1, meaning that auto-expansion is disabled.

This property was introduced in Qt 4.3.

Access functions:

int autoExpandDelay() const
void setAutoExpandDelay(int delay)

pub unsafe fn collapse(&self, index: impl CastInto<Ref<QModelIndex>>)[src]

Collapses the model item specified by the index.

Calls C++ function: [slot] void QTreeView::collapse(const QModelIndex& index).

C++ documentation:

Collapses the model item specified by the index.

See also collapsed().

pub unsafe fn collapse_all(&self)[src]

Collapses all expanded items.

Calls C++ function: [slot] void QTreeView::collapseAll().

C++ documentation:

Collapses all expanded items.

This function was introduced in Qt 4.2.

See also expandAll(), expand(), collapse(), and setExpanded().

pub unsafe fn column_at(&self, x: c_int) -> c_int[src]

Returns the column in the tree view whose header covers the x coordinate given.

Calls C++ function: int QTreeView::columnAt(int x) const.

C++ documentation:

Returns the column in the tree view whose header covers the x coordinate given.

pub unsafe fn column_viewport_position(&self, column: c_int) -> c_int[src]

Returns the horizontal position of the column in the viewport.

Calls C++ function: int QTreeView::columnViewportPosition(int column) const.

C++ documentation:

Returns the horizontal position of the column in the viewport.

pub unsafe fn column_width(&self, column: c_int) -> c_int[src]

Returns the width of the column.

Calls C++ function: int QTreeView::columnWidth(int column) const.

C++ documentation:

Returns the width of the column.

See also resizeColumnToContents() and setColumnWidth().

pub unsafe fn data_changed_3a(
    &self,
    top_left: impl CastInto<Ref<QModelIndex>>,
    bottom_right: impl CastInto<Ref<QModelIndex>>,
    roles: impl CastInto<Ref<QVectorOfInt>>
)
[src]

Reimplemented from QAbstractItemView::dataChanged().

Calls C++ function: virtual void QTreeView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles = …).

C++ documentation:

Reimplemented from QAbstractItemView::dataChanged().

pub unsafe fn data_changed_2a(
    &self,
    top_left: impl CastInto<Ref<QModelIndex>>,
    bottom_right: impl CastInto<Ref<QModelIndex>>
)
[src]

Reimplemented from QAbstractItemView::dataChanged().

Calls C++ function: virtual void QTreeView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight).

C++ documentation:

Reimplemented from QAbstractItemView::dataChanged().

pub unsafe fn do_items_layout(&self)[src]

Calls C++ function: virtual void QTreeView::doItemsLayout().

pub unsafe fn expand(&self, index: impl CastInto<Ref<QModelIndex>>)[src]

Expands the model item specified by the index.

Calls C++ function: [slot] void QTreeView::expand(const QModelIndex& index).

C++ documentation:

Expands the model item specified by the index.

See also expanded().

pub unsafe fn expand_all(&self)[src]

Expands all expandable items.

Calls C++ function: [slot] void QTreeView::expandAll().

C++ documentation:

Expands all expandable items.

Warning: if the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 4.2.

See also collapseAll(), expand(), collapse(), and setExpanded().

pub unsafe fn expand_recursively_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    depth: c_int
)
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Expands the item at the given index and all its children to the given depth. The depth is relative to the given index. A depth of -1 will expand all children, a depth of 0 will only expand the given index.

Calls C++ function: void QTreeView::expandRecursively(const QModelIndex& index, int depth = …).

C++ documentation:

Expands the item at the given index and all its children to the given depth. The depth is relative to the given index. A depth of -1 will expand all children, a depth of 0 will only expand the given index.

Warning: : if the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 5.13.

See also expandAll().

pub unsafe fn expand_recursively_1a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Expands the item at the given index and all its children to the given depth. The depth is relative to the given index. A depth of -1 will expand all children, a depth of 0 will only expand the given index.

Calls C++ function: void QTreeView::expandRecursively(const QModelIndex& index).

C++ documentation:

Expands the item at the given index and all its children to the given depth. The depth is relative to the given index. A depth of -1 will expand all children, a depth of 0 will only expand the given index.

Warning: : if the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 5.13.

See also expandAll().

pub unsafe fn expand_to_depth(&self, depth: c_int)[src]

Expands all expandable items to the given depth.

Calls C++ function: [slot] void QTreeView::expandToDepth(int depth).

C++ documentation:

Expands all expandable items to the given depth.

This function was introduced in Qt 4.3.

See also expandAll(), collapseAll(), expand(), collapse(), and setExpanded().

pub unsafe fn expands_on_double_click(&self) -> bool[src]

This property holds whether the items can be expanded by double-clicking.

Calls C++ function: bool QTreeView::expandsOnDoubleClick() const.

C++ documentation:

This property holds whether the items can be expanded by double-clicking.

This property holds whether the user can expand and collapse items by double-clicking. The default value is true.

This property was introduced in Qt 4.4.

Access functions:

bool expandsOnDoubleClick() const
void setExpandsOnDoubleClick(bool enable)

See also itemsExpandable.

pub unsafe fn header(&self) -> QPtr<QHeaderView>[src]

Returns the header for the tree view.

Calls C++ function: QHeaderView* QTreeView::header() const.

C++ documentation:

Returns the header for the tree view.

See also setHeader() and QAbstractItemModel::headerData().

pub unsafe fn hide_column(&self, column: c_int)[src]

Hides the column given.

Calls C++ function: [slot] void QTreeView::hideColumn(int column).

C++ documentation:

Hides the column given.

Note: This function should only be called after the model has been initialized, as the view needs to know the number of columns in order to hide column.

See also showColumn() and setColumnHidden().

pub unsafe fn indentation(&self) -> c_int[src]

indentation of the items in the tree view.

Calls C++ function: int QTreeView::indentation() const.

C++ documentation:

indentation of the items in the tree view.

This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.

By default, the value of this property is style dependent. Thus, when the style changes, this property updates from it. Calling setIndentation() stops the updates, calling resetIndentation() will restore default behavior.

Access functions:

int indentation() const
void setIndentation(int i)
void resetIndentation()

pub unsafe fn index_above(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns the model index of the item above index.

Calls C++ function: QModelIndex QTreeView::indexAbove(const QModelIndex& index) const.

C++ documentation:

Returns the model index of the item above index.

pub unsafe fn index_at(
    &self,
    p: impl CastInto<Ref<QPoint>>
) -> CppBox<QModelIndex>
[src]

Reimplemented from QAbstractItemView::indexAt().

Calls C++ function: virtual QModelIndex QTreeView::indexAt(const QPoint& p) const.

C++ documentation:

Reimplemented from QAbstractItemView::indexAt().

pub unsafe fn index_below(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns the model index of the item below index.

Calls C++ function: QModelIndex QTreeView::indexBelow(const QModelIndex& index) const.

C++ documentation:

Returns the model index of the item below index.

pub unsafe fn is_animated(&self) -> bool[src]

This property holds whether animations are enabled

Calls C++ function: bool QTreeView::isAnimated() const.

C++ documentation:

This property holds whether animations are enabled

If this property is true the treeview will animate expansion and collapsing of branches. If this property is false, the treeview will expand or collapse branches immediately without showing the animation.

By default, this property is false.

This property was introduced in Qt 4.2.

Access functions:

bool isAnimated() const
void setAnimated(bool enable)

pub unsafe fn is_column_hidden(&self, column: c_int) -> bool[src]

Returns true if the column is hidden; otherwise returns false.

Calls C++ function: bool QTreeView::isColumnHidden(int column) const.

C++ documentation:

Returns true if the column is hidden; otherwise returns false.

See also hideColumn() and isRowHidden().

pub unsafe fn is_expanded(&self, index: impl CastInto<Ref<QModelIndex>>) -> bool[src]

Returns true if the model item index is expanded; otherwise returns false.

Calls C++ function: bool QTreeView::isExpanded(const QModelIndex& index) const.

C++ documentation:

Returns true if the model item index is expanded; otherwise returns false.

See also expand(), expanded(), and setExpanded().

pub unsafe fn is_first_column_spanned(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if the item in first column in the given row of the parent is spanning all the columns; otherwise returns false.

Calls C++ function: bool QTreeView::isFirstColumnSpanned(int row, const QModelIndex& parent) const.

C++ documentation:

Returns true if the item in first column in the given row of the parent is spanning all the columns; otherwise returns false.

This function was introduced in Qt 4.3.

See also setFirstColumnSpanned().

pub unsafe fn is_header_hidden(&self) -> bool[src]

This property holds whether the header is shown or not.

Calls C++ function: bool QTreeView::isHeaderHidden() const.

C++ documentation:

This property holds whether the header is shown or not.

If this property is true, the header is not shown otherwise it is. The default value is false.

This property was introduced in Qt 4.4.

Access functions:

bool isHeaderHidden() const
void setHeaderHidden(bool hide)

See also header().

pub unsafe fn is_row_hidden(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if the item in the given row of the parent is hidden; otherwise returns false.

Calls C++ function: bool QTreeView::isRowHidden(int row, const QModelIndex& parent) const.

C++ documentation:

Returns true if the item in the given row of the parent is hidden; otherwise returns false.

See also setRowHidden() and isColumnHidden().

pub unsafe fn is_sorting_enabled(&self) -> bool[src]

This property holds whether sorting is enabled

Calls C++ function: bool QTreeView::isSortingEnabled() const.

C++ documentation:

This property holds whether sorting is enabled

If this property is true, sorting is enabled for the tree; if the property is false, sorting is not enabled. The default value is false.

Note: In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. Alternatively, you could also insert the items into a list before inserting the items into the tree.

This property was introduced in Qt 4.2.

Access functions:

bool isSortingEnabled() const
void setSortingEnabled(bool enable)

See also sortByColumn().

pub unsafe fn items_expandable(&self) -> bool[src]

This property holds whether the items are expandable by the user.

Calls C++ function: bool QTreeView::itemsExpandable() const.

C++ documentation:

This property holds whether the items are expandable by the user.

This property holds whether the user can expand and collapse items interactively.

By default, this property is true.

Access functions:

bool itemsExpandable() const
void setItemsExpandable(bool enable)

Reimplemented from QAbstractItemView::keyboardSearch().

Calls C++ function: virtual void QTreeView::keyboardSearch(const QString& search).

C++ documentation:

Reimplemented from QAbstractItemView::keyboardSearch().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QTreeView::metaObject() const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QTreeView::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QTreeView::qt_metacast(const char* arg1).

pub unsafe fn reset(&self)[src]

Reimplemented from QAbstractItemView::reset().

Calls C++ function: virtual void QTreeView::reset().

C++ documentation:

Reimplemented from QAbstractItemView::reset().

pub unsafe fn reset_indentation(&self)[src]

indentation of the items in the tree view.

Calls C++ function: void QTreeView::resetIndentation().

C++ documentation:

indentation of the items in the tree view.

This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.

By default, the value of this property is style dependent. Thus, when the style changes, this property updates from it. Calling setIndentation() stops the updates, calling resetIndentation() will restore default behavior.

Access functions:

int indentation() const
void setIndentation(int i)
void resetIndentation()

pub unsafe fn resize_column_to_contents(&self, column: c_int)[src]

Resizes the column given to the size of its contents.

Calls C++ function: [slot] void QTreeView::resizeColumnToContents(int column).

C++ documentation:

Resizes the column given to the size of its contents.

See also columnWidth(), setColumnWidth(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

pub unsafe fn root_is_decorated(&self) -> bool[src]

This property holds whether to show controls for expanding and collapsing top-level items

Calls C++ function: bool QTreeView::rootIsDecorated() const.

C++ documentation:

This property holds whether to show controls for expanding and collapsing top-level items

Items with children are typically shown with controls to expand and collapse them, allowing their children to be shown or hidden. If this property is false, these controls are not shown for top-level items. This can be used to make a single level tree structure appear like a simple list of items.

By default, this property is true.

Access functions:

bool rootIsDecorated() const
void setRootIsDecorated(bool show)

pub unsafe fn scroll_to_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    hint: ScrollHint
)
[src]

Reimplemented from QAbstractItemView::scrollTo().

Calls C++ function: virtual void QTreeView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = …).

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

Scroll the contents of the tree view until the given model item index is visible. The hint parameter specifies more precisely where the item should be located after the operation. If any of the parents of the model item are collapsed, they will be expanded to ensure that the model item is visible.

pub unsafe fn scroll_to_1a(&self, index: impl CastInto<Ref<QModelIndex>>)[src]

Reimplemented from QAbstractItemView::scrollTo().

Calls C++ function: virtual void QTreeView::scrollTo(const QModelIndex& index).

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

Scroll the contents of the tree view until the given model item index is visible. The hint parameter specifies more precisely where the item should be located after the operation. If any of the parents of the model item are collapsed, they will be expanded to ensure that the model item is visible.

pub unsafe fn select_all(&self)[src]

Reimplemented from QAbstractItemView::selectAll().

Calls C++ function: virtual void QTreeView::selectAll().

C++ documentation:

Reimplemented from QAbstractItemView::selectAll().

pub unsafe fn set_all_columns_show_focus(&self, enable: bool)[src]

This property holds whether items should show keyboard focus using all columns

Calls C++ function: void QTreeView::setAllColumnsShowFocus(bool enable).

C++ documentation:

This property holds whether items should show keyboard focus using all columns

If this property is true all columns will show focus, otherwise only one column will show focus.

The default is false.

This property was introduced in Qt 4.2.

Access functions:

bool allColumnsShowFocus() const
void setAllColumnsShowFocus(bool enable)

pub unsafe fn set_animated(&self, enable: bool)[src]

This property holds whether animations are enabled

Calls C++ function: void QTreeView::setAnimated(bool enable).

C++ documentation:

This property holds whether animations are enabled

If this property is true the treeview will animate expansion and collapsing of branches. If this property is false, the treeview will expand or collapse branches immediately without showing the animation.

By default, this property is false.

This property was introduced in Qt 4.2.

Access functions:

bool isAnimated() const
void setAnimated(bool enable)

pub unsafe fn set_auto_expand_delay(&self, delay: c_int)[src]

This property holds the delay time before items in a tree are opened during a drag and drop operation.

Calls C++ function: void QTreeView::setAutoExpandDelay(int delay).

C++ documentation:

This property holds the delay time before items in a tree are opened during a drag and drop operation.

This property holds the amount of time in milliseconds that the user must wait over a node before that node will automatically open or close. If the time is set to less then 0 then it will not be activated.

By default, this property has a value of -1, meaning that auto-expansion is disabled.

This property was introduced in Qt 4.3.

Access functions:

int autoExpandDelay() const
void setAutoExpandDelay(int delay)

pub unsafe fn set_column_hidden(&self, column: c_int, hide: bool)[src]

If hide is true the column is hidden, otherwise the column is shown.

Calls C++ function: void QTreeView::setColumnHidden(int column, bool hide).

C++ documentation:

If hide is true the column is hidden, otherwise the column is shown.

See also isColumnHidden(), hideColumn(), and setRowHidden().

pub unsafe fn set_column_width(&self, column: c_int, width: c_int)[src]

Sets the width of the given column to the width specified.

Calls C++ function: void QTreeView::setColumnWidth(int column, int width).

C++ documentation:

Sets the width of the given column to the width specified.

This function was introduced in Qt 4.2.

See also columnWidth() and resizeColumnToContents().

pub unsafe fn set_expanded(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    expand: bool
)
[src]

Sets the item referred to by index to either collapse or expanded, depending on the value of expanded.

Calls C++ function: void QTreeView::setExpanded(const QModelIndex& index, bool expand).

C++ documentation:

Sets the item referred to by index to either collapse or expanded, depending on the value of expanded.

See also expanded(), expand(), and isExpanded().

pub unsafe fn set_expands_on_double_click(&self, enable: bool)[src]

This property holds whether the items can be expanded by double-clicking.

Calls C++ function: void QTreeView::setExpandsOnDoubleClick(bool enable).

C++ documentation:

This property holds whether the items can be expanded by double-clicking.

This property holds whether the user can expand and collapse items by double-clicking. The default value is true.

This property was introduced in Qt 4.4.

Access functions:

bool expandsOnDoubleClick() const
void setExpandsOnDoubleClick(bool enable)

See also itemsExpandable.

pub unsafe fn set_first_column_spanned(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>,
    span: bool
)
[src]

If span is true the item in the first column in the row with the given parent is set to span all columns, otherwise all items on the row are shown.

Calls C++ function: void QTreeView::setFirstColumnSpanned(int row, const QModelIndex& parent, bool span).

C++ documentation:

If span is true the item in the first column in the row with the given parent is set to span all columns, otherwise all items on the row are shown.

This function was introduced in Qt 4.3.

See also isFirstColumnSpanned().

pub unsafe fn set_header(&self, header: impl CastInto<Ptr<QHeaderView>>)[src]

Sets the header for the tree view, to the given header.

Calls C++ function: void QTreeView::setHeader(QHeaderView* header).

C++ documentation:

Sets the header for the tree view, to the given header.

The view takes ownership over the given header and deletes it when a new header is set.

See also QAbstractItemModel::headerData().

pub unsafe fn set_header_hidden(&self, hide: bool)[src]

This property holds whether the header is shown or not.

Calls C++ function: void QTreeView::setHeaderHidden(bool hide).

C++ documentation:

This property holds whether the header is shown or not.

If this property is true, the header is not shown otherwise it is. The default value is false.

This property was introduced in Qt 4.4.

Access functions:

bool isHeaderHidden() const
void setHeaderHidden(bool hide)

See also header().

pub unsafe fn set_indentation(&self, i: c_int)[src]

indentation of the items in the tree view.

Calls C++ function: void QTreeView::setIndentation(int i).

C++ documentation:

indentation of the items in the tree view.

This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.

By default, the value of this property is style dependent. Thus, when the style changes, this property updates from it. Calling setIndentation() stops the updates, calling resetIndentation() will restore default behavior.

Access functions:

int indentation() const
void setIndentation(int i)
void resetIndentation()

pub unsafe fn set_items_expandable(&self, enable: bool)[src]

This property holds whether the items are expandable by the user.

Calls C++ function: void QTreeView::setItemsExpandable(bool enable).

C++ documentation:

This property holds whether the items are expandable by the user.

This property holds whether the user can expand and collapse items interactively.

By default, this property is true.

Access functions:

bool itemsExpandable() const
void setItemsExpandable(bool enable)

pub unsafe fn set_model(&self, model: impl CastInto<Ptr<QAbstractItemModel>>)[src]

Reimplemented from QAbstractItemView::setModel().

Calls C++ function: virtual void QTreeView::setModel(QAbstractItemModel* model).

C++ documentation:

Reimplemented from QAbstractItemView::setModel().

pub unsafe fn set_root_index(&self, index: impl CastInto<Ref<QModelIndex>>)[src]

Reimplemented from QAbstractItemView::setRootIndex().

Calls C++ function: virtual void QTreeView::setRootIndex(const QModelIndex& index).

C++ documentation:

Reimplemented from QAbstractItemView::setRootIndex().

pub unsafe fn set_root_is_decorated(&self, show: bool)[src]

This property holds whether to show controls for expanding and collapsing top-level items

Calls C++ function: void QTreeView::setRootIsDecorated(bool show).

C++ documentation:

This property holds whether to show controls for expanding and collapsing top-level items

Items with children are typically shown with controls to expand and collapse them, allowing their children to be shown or hidden. If this property is false, these controls are not shown for top-level items. This can be used to make a single level tree structure appear like a simple list of items.

By default, this property is true.

Access functions:

bool rootIsDecorated() const
void setRootIsDecorated(bool show)

pub unsafe fn set_row_hidden(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>,
    hide: bool
)
[src]

If hide is true the row with the given parent is hidden, otherwise the row is shown.

Calls C++ function: void QTreeView::setRowHidden(int row, const QModelIndex& parent, bool hide).

C++ documentation:

If hide is true the row with the given parent is hidden, otherwise the row is shown.

See also isRowHidden() and setColumnHidden().

pub unsafe fn set_selection_model(
    &self,
    selection_model: impl CastInto<Ptr<QItemSelectionModel>>
)
[src]

Reimplemented from QAbstractItemView::setSelectionModel().

Calls C++ function: virtual void QTreeView::setSelectionModel(QItemSelectionModel* selectionModel).

C++ documentation:

Reimplemented from QAbstractItemView::setSelectionModel().

pub unsafe fn set_sorting_enabled(&self, enable: bool)[src]

This property holds whether sorting is enabled

Calls C++ function: void QTreeView::setSortingEnabled(bool enable).

C++ documentation:

This property holds whether sorting is enabled

If this property is true, sorting is enabled for the tree; if the property is false, sorting is not enabled. The default value is false.

Note: In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. Alternatively, you could also insert the items into a list before inserting the items into the tree.

This property was introduced in Qt 4.2.

Access functions:

bool isSortingEnabled() const
void setSortingEnabled(bool enable)

See also sortByColumn().

pub unsafe fn set_tree_position(&self, logical_index: c_int)[src]

This specifies that the tree structure should be placed at logical index index. If set to -1 then the tree will always follow visual index 0.

Calls C++ function: void QTreeView::setTreePosition(int logicalIndex).

C++ documentation:

This specifies that the tree structure should be placed at logical index index. If set to -1 then the tree will always follow visual index 0.

This function was introduced in Qt 5.2.

See also treePosition(), QHeaderView::swapSections(), and QHeaderView::moveSection().

pub unsafe fn set_uniform_row_heights(&self, uniform: bool)[src]

This property holds whether all items in the treeview have the same height

Calls C++ function: void QTreeView::setUniformRowHeights(bool uniform).

C++ documentation:

This property holds whether all items in the treeview have the same height

This property should only be set to true if it is guaranteed that all items in the view has the same height. This enables the view to do some optimizations.

The height is obtained from the first item in the view. It is updated when the data changes on that item.

Note: If the editor size hint is bigger than the cell size hint, then the size hint of the editor will be used.

By default, this property is false.

Access functions:

bool uniformRowHeights() const
void setUniformRowHeights(bool uniform)

pub unsafe fn set_word_wrap(&self, on: bool)[src]

This property holds the item text word-wrapping policy

Calls C++ function: void QTreeView::setWordWrap(bool on).

C++ documentation:

This property holds the item text word-wrapping policy

If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false by default.

Note that even if wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.

This property was introduced in Qt 4.3.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

pub unsafe fn show_column(&self, column: c_int)[src]

Shows the given column in the tree view.

Calls C++ function: [slot] void QTreeView::showColumn(int column).

C++ documentation:

Shows the given column in the tree view.

See also hideColumn() and setColumnHidden().

pub unsafe fn sort_by_column_2a(&self, column: c_int, order: SortOrder)[src]

Sets the model up for sorting by the values in the given column and order.

Calls C++ function: void QTreeView::sortByColumn(int column, Qt::SortOrder order).

C++ documentation:

Sets the model up for sorting by the values in the given column and order.

column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.

This function was introduced in Qt 4.2.

See also sortingEnabled.

pub unsafe fn sort_by_column_1a(&self, column: c_int)[src]

Sets the model up for sorting by the values in the given column and order.

Calls C++ function: [slot] void QTreeView::sortByColumn(int column).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for void QTreeView::sortByColumn(int column, Qt::SortOrder order):

Sets the model up for sorting by the values in the given column and order.

column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.

This function was introduced in Qt 4.2.

See also sortingEnabled.

pub unsafe fn tree_position(&self) -> c_int[src]

Return the logical index the tree is set on. If the return value is -1 then the tree is placed on the visual index 0.

Calls C++ function: int QTreeView::treePosition() const.

C++ documentation:

Return the logical index the tree is set on. If the return value is -1 then the tree is placed on the visual index 0.

This function was introduced in Qt 5.2.

See also setTreePosition().

pub unsafe fn uniform_row_heights(&self) -> bool[src]

This property holds whether all items in the treeview have the same height

Calls C++ function: bool QTreeView::uniformRowHeights() const.

C++ documentation:

This property holds whether all items in the treeview have the same height

This property should only be set to true if it is guaranteed that all items in the view has the same height. This enables the view to do some optimizations.

The height is obtained from the first item in the view. It is updated when the data changes on that item.

Note: If the editor size hint is bigger than the cell size hint, then the size hint of the editor will be used.

By default, this property is false.

Access functions:

bool uniformRowHeights() const
void setUniformRowHeights(bool uniform)

pub unsafe fn visual_rect(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QRect>
[src]

Reimplemented from QAbstractItemView::visualRect().

Calls C++ function: virtual QRect QTreeView::visualRect(const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemView::visualRect().

Returns the rectangle on the viewport occupied by the item at index. If the index is not visible or explicitly hidden, the returned rectangle is invalid.

pub unsafe fn word_wrap(&self) -> bool[src]

This property holds the item text word-wrapping policy

Calls C++ function: bool QTreeView::wordWrap() const.

C++ documentation:

This property holds the item text word-wrapping policy

If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false by default.

Note that even if wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.

This property was introduced in Qt 4.3.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

Trait Implementations

impl CppDeletable for QTreeWidget[src]

unsafe fn delete(&self)[src]

Destroys the tree widget and all its items.

Calls C++ function: virtual [destructor] void QTreeWidget::~QTreeWidget().

C++ documentation:

Destroys the tree widget and all its items.

impl Deref for QTreeWidget[src]

type Target = QTreeView

The resulting type after dereferencing.

fn deref(&self) -> &QTreeView[src]

Calls C++ function: QTreeView* static_cast<QTreeView*>(QTreeWidget* ptr).

impl DynamicCast<QTreeWidget> for QTreeView[src]

unsafe fn dynamic_cast(ptr: Ptr<QTreeView>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QTreeView* ptr).

impl DynamicCast<QTreeWidget> for QAbstractItemView[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractItemView>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QAbstractItemView* ptr).

impl DynamicCast<QTreeWidget> for QAbstractScrollArea[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QAbstractScrollArea* ptr).

impl DynamicCast<QTreeWidget> for QFrame[src]

unsafe fn dynamic_cast(ptr: Ptr<QFrame>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QFrame* ptr).

impl DynamicCast<QTreeWidget> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QWidget* ptr).

impl DynamicCast<QTreeWidget> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QObject* ptr).

impl DynamicCast<QTreeWidget> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* dynamic_cast<QTreeWidget*>(QPaintDevice* ptr).

impl StaticDowncast<QTreeWidget> for QTreeView[src]

unsafe fn static_downcast(ptr: Ptr<QTreeView>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QTreeView* ptr).

impl StaticDowncast<QTreeWidget> for QAbstractItemView[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractItemView>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QAbstractItemView* ptr).

impl StaticDowncast<QTreeWidget> for QAbstractScrollArea[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QAbstractScrollArea* ptr).

impl StaticDowncast<QTreeWidget> for QFrame[src]

unsafe fn static_downcast(ptr: Ptr<QFrame>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QFrame* ptr).

impl StaticDowncast<QTreeWidget> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QWidget* ptr).

impl StaticDowncast<QTreeWidget> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QObject* ptr).

impl StaticDowncast<QTreeWidget> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QTreeWidget>[src]

Calls C++ function: QTreeWidget* static_cast<QTreeWidget*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractItemView> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QAbstractItemView>[src]

Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QTreeWidget* ptr).

impl StaticUpcast<QAbstractScrollArea> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QAbstractScrollArea>[src]

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QTreeWidget* ptr).

impl StaticUpcast<QFrame> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QFrame>[src]

Calls C++ function: QFrame* static_cast<QFrame*>(QTreeWidget* ptr).

impl StaticUpcast<QObject> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QTreeWidget* ptr).

impl StaticUpcast<QPaintDevice> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QTreeWidget* ptr).

impl StaticUpcast<QTreeView> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QTreeView>[src]

Calls C++ function: QTreeView* static_cast<QTreeView*>(QTreeWidget* ptr).

impl StaticUpcast<QWidget> for QTreeWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTreeWidget>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QTreeWidget* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.