[][src]Struct qt_widgets::QListView

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

The QListView class provides a list or icon view onto a model.

C++ class: QListView.

C++ documentation:

The QListView class provides a list or icon view onto a model.

A QListView presents items stored in a model, either as a simple non-hierarchical list, or as a collection of icons. This class is used to provide lists and icon views that were previously provided by the QListBox and QIconView classes, but using the more flexible approach provided by Qt's model/view architecture.

The QListView class is one of the Model/View Classes and is part of Qt's model/view framework.

This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use QTreeView instead.

QListView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

Items in a list view can be displayed using one of two view modes: In ListMode, the items are displayed in the form of a simple list; in IconMode, the list view takes the form of an icon view in which the items are displayed with icons like files in a file manager. By default, the list view is in ListMode. To change the view mode, use the setViewMode() function, and to determine the current view mode, use viewMode().

Items in these views are laid out in the direction specified by the flow() of the list view. The items may be fixed in place, or allowed to move, depending on the view's movement() state.

If the items in the model cannot be completely laid out in the direction of flow, they can be wrapped at the boundary of the view widget; this depends on isWrapping(). This property is useful when the items are being represented by an icon view.

The resizeMode() and layoutMode() govern how and when the items are laid out. Items are spaced according to their spacing(), and can exist within a notional grid of size specified by gridSize(). The items can be rendered as large or small icons depending on their iconSize().

Methods

impl QListView[src]

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

This signal is emitted when the specified indexes are moved in the view.

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

C++ documentation:

This signal is emitted when the specified indexes are moved in the view.

This function was introduced in Qt 4.2.

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

This property holds the number of items laid out in each batch if layoutMode is set to Batched

Calls C++ function: int QListView::batchSize() const.

C++ documentation:

This property holds the number of items laid out in each batch if layoutMode is set to Batched

The default value is 100.

This property was introduced in Qt 4.2.

Access functions:

int batchSize() const
void setBatchSize(int batchSize)

pub unsafe fn clear_property_flags(&mut self)[src]

Clears the QListView-specific property flags. See viewMode.

Calls C++ function: void QListView::clearPropertyFlags().

C++ documentation:

Clears the QListView-specific property flags. See viewMode.

Properties inherited from QAbstractItemView are not covered by the property flags. Specifically, dragEnabled and acceptsDrops are computed by QListView when calling setMovement() or setViewMode().

pub unsafe fn do_items_layout(&mut self)[src]

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

pub unsafe fn flow(&self) -> Flow[src]

This property holds which direction the items layout should flow.

Calls C++ function: QListView::Flow QListView::flow() const.

C++ documentation:

This property holds which direction the items layout should flow.

If this property is LeftToRight, the items will be laid out left to right. If the isWrapping property is true, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is set to TopToBottom.

Access functions:

Flow flow() const
void setFlow(Flow flow)

See also viewMode.

pub unsafe fn grid_size(&self) -> CppBox<QSize>[src]

This property holds the size of the layout grid

Calls C++ function: QSize QListView::gridSize() const.

C++ documentation:

This property holds the size of the layout grid

This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize gridSize() const
void setGridSize(const QSize &size)

See also viewMode.

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

Reimplemented from QAbstractItemView::indexAt().

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

C++ documentation:

Reimplemented from QAbstractItemView::indexAt().

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

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

Calls C++ function: bool QListView::isRowHidden(int row) const.

C++ documentation:

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

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

if the selection rectangle should be visible

Calls C++ function: bool QListView::isSelectionRectVisible() const.

C++ documentation:

if the selection rectangle should be visible

If this property is true then the selection rectangle is visible; otherwise it will be hidden.

Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection.

By default, this property is false.

This property was introduced in Qt 4.3.

Access functions:

bool isSelectionRectVisible() const
void setSelectionRectVisible(bool show)

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

This property holds whether the items layout should wrap.

Calls C++ function: bool QListView::isWrapping() const.

C++ documentation:

This property holds whether the items layout should wrap.

This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is false.

Access functions:

bool isWrapping() const
void setWrapping(bool enable)

See also viewMode.

pub unsafe fn item_alignment(&self) -> QFlags<AlignmentFlag>[src]

This property holds the alignment of each item in its cell

Calls C++ function: QFlags<Qt::AlignmentFlag> QListView::itemAlignment() const.

C++ documentation:

This property holds the alignment of each item in its cell

This is only supported in ListMode with TopToBottom flow and with wrapping enabled. The default alignment is 0, which means that an item fills its cell entirely.

This property was introduced in Qt 5.12.

Access functions:

Qt::Alignment itemAlignment() const
void setItemAlignment(Qt::Alignment alignment)

This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn layout_mode(&self) -> LayoutMode[src]

determines whether the layout of items should happen immediately or be delayed.

Calls C++ function: QListView::LayoutMode QListView::layoutMode() const.

C++ documentation:

determines whether the layout of items should happen immediately or be delayed.

This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched, the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.

Access functions:

LayoutMode layoutMode() const
void setLayoutMode(LayoutMode mode)

See also viewMode.

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

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

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

This property holds the column in the model that is visible

Calls C++ function: int QListView::modelColumn() const.

C++ documentation:

This property holds the column in the model that is visible

By default, this property contains 0, indicating that the first column in the model will be shown.

Access functions:

int modelColumn() const
void setModelColumn(int column)

pub unsafe fn movement(&self) -> Movement[src]

This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.

Calls C++ function: QListView::Movement QListView::movement() const.

C++ documentation:

This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.

This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is set to Static.

Access functions:

Movement movement() const
void setMovement(Movement movement)

See also gridSize, resizeMode, and viewMode.

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QListView>
[src]

Creates a new QListView with the given parent to view a model. Use setModel() to set the model.

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

C++ documentation:

Creates a new QListView with the given parent to view a model. Use setModel() to set the model.

pub unsafe fn new_0a() -> CppBox<QListView>[src]

The QListView class provides a list or icon view onto a model.

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

C++ documentation:

The QListView class provides a list or icon view onto a model.

A QListView presents items stored in a model, either as a simple non-hierarchical list, or as a collection of icons. This class is used to provide lists and icon views that were previously provided by the QListBox and QIconView classes, but using the more flexible approach provided by Qt's model/view architecture.

The QListView class is one of the Model/View Classes and is part of Qt's model/view framework.

This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use QTreeView instead.

QListView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

Items in a list view can be displayed using one of two view modes: In ListMode, the items are displayed in the form of a simple list; in IconMode, the list view takes the form of an icon view in which the items are displayed with icons like files in a file manager. By default, the list view is in ListMode. To change the view mode, use the setViewMode() function, and to determine the current view mode, use viewMode().

Items in these views are laid out in the direction specified by the flow() of the list view. The items may be fixed in place, or allowed to move, depending on the view's movement() state.

If the items in the model cannot be completely laid out in the direction of flow, they can be wrapped at the boundary of the view widget; this depends on isWrapping(). This property is useful when the items are being represented by an icon view.

The resizeMode() and layoutMode() govern how and when the items are laid out. Items are spaced according to their spacing(), and can exist within a notional grid of size specified by gridSize(). The items can be rendered as large or small icons depending on their iconSize().

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

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

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

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

pub unsafe fn reset(&mut self)[src]

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

pub unsafe fn resize_mode(&self) -> ResizeMode[src]

This property holds whether the items are laid out again when the view is resized.

Calls C++ function: QListView::ResizeMode QListView::resizeMode() const.

C++ documentation:

This property holds whether the items are laid out again when the view is resized.

If this property is Adjust, the items will be laid out again when the view is resized. If the value is Fixed, the items will not be laid out when the view is resized.

By default, this property is set to Fixed.

Access functions:

ResizeMode resizeMode() const
void setResizeMode(ResizeMode mode)

See also movement, gridSize, and viewMode.

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

Reimplemented from QAbstractItemView::scrollTo().

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

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

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

Reimplemented from QAbstractItemView::scrollTo().

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

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

pub unsafe fn set_batch_size(&mut self, batch_size: c_int)[src]

This property holds the number of items laid out in each batch if layoutMode is set to Batched

Calls C++ function: void QListView::setBatchSize(int batchSize).

C++ documentation:

This property holds the number of items laid out in each batch if layoutMode is set to Batched

The default value is 100.

This property was introduced in Qt 4.2.

Access functions:

int batchSize() const
void setBatchSize(int batchSize)

pub unsafe fn set_flow(&mut self, flow: Flow)[src]

This property holds which direction the items layout should flow.

Calls C++ function: void QListView::setFlow(QListView::Flow flow).

C++ documentation:

This property holds which direction the items layout should flow.

If this property is LeftToRight, the items will be laid out left to right. If the isWrapping property is true, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is set to TopToBottom.

Access functions:

Flow flow() const
void setFlow(Flow flow)

See also viewMode.

pub unsafe fn set_grid_size(&mut self, size: impl CastInto<Ref<QSize>>)[src]

This property holds the size of the layout grid

Calls C++ function: void QListView::setGridSize(const QSize& size).

C++ documentation:

This property holds the size of the layout grid

This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize gridSize() const
void setGridSize(const QSize &size)

See also viewMode.

pub unsafe fn set_item_alignment(&mut self, alignment: QFlags<AlignmentFlag>)[src]

This property holds the alignment of each item in its cell

Calls C++ function: void QListView::setItemAlignment(QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

This property holds the alignment of each item in its cell

This is only supported in ListMode with TopToBottom flow and with wrapping enabled. The default alignment is 0, which means that an item fills its cell entirely.

This property was introduced in Qt 5.12.

Access functions:

Qt::Alignment itemAlignment() const
void setItemAlignment(Qt::Alignment alignment)

This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn set_layout_mode(&mut self, mode: LayoutMode)[src]

determines whether the layout of items should happen immediately or be delayed.

Calls C++ function: void QListView::setLayoutMode(QListView::LayoutMode mode).

C++ documentation:

determines whether the layout of items should happen immediately or be delayed.

This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched, the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.

Access functions:

LayoutMode layoutMode() const
void setLayoutMode(LayoutMode mode)

See also viewMode.

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

This property holds the column in the model that is visible

Calls C++ function: void QListView::setModelColumn(int column).

C++ documentation:

This property holds the column in the model that is visible

By default, this property contains 0, indicating that the first column in the model will be shown.

Access functions:

int modelColumn() const
void setModelColumn(int column)

pub unsafe fn set_movement(&mut self, movement: Movement)[src]

This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.

Calls C++ function: void QListView::setMovement(QListView::Movement movement).

C++ documentation:

This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.

This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is set to Static.

Access functions:

Movement movement() const
void setMovement(Movement movement)

See also gridSize, resizeMode, and viewMode.

pub unsafe fn set_resize_mode(&mut self, mode: ResizeMode)[src]

This property holds whether the items are laid out again when the view is resized.

Calls C++ function: void QListView::setResizeMode(QListView::ResizeMode mode).

C++ documentation:

This property holds whether the items are laid out again when the view is resized.

If this property is Adjust, the items will be laid out again when the view is resized. If the value is Fixed, the items will not be laid out when the view is resized.

By default, this property is set to Fixed.

Access functions:

ResizeMode resizeMode() const
void setResizeMode(ResizeMode mode)

See also movement, gridSize, and viewMode.

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

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

pub unsafe fn set_row_hidden(&mut self, row: c_int, hide: bool)[src]

If hide is true, the given row will be hidden; otherwise the row will be shown.

Calls C++ function: void QListView::setRowHidden(int row, bool hide).

C++ documentation:

If hide is true, the given row will be hidden; otherwise the row will be shown.

See also isRowHidden().

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

if the selection rectangle should be visible

Calls C++ function: void QListView::setSelectionRectVisible(bool show).

C++ documentation:

if the selection rectangle should be visible

If this property is true then the selection rectangle is visible; otherwise it will be hidden.

Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection.

By default, this property is false.

This property was introduced in Qt 4.3.

Access functions:

bool isSelectionRectVisible() const
void setSelectionRectVisible(bool show)

pub unsafe fn set_spacing(&mut self, space: c_int)[src]

This property holds the space around the items in the layout

Calls C++ function: void QListView::setSpacing(int space).

C++ documentation:

This property holds the space around the items in the layout

This property is the size of the empty space that is padded around an item in the layout.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property contains a value of 0.

Access functions:

int spacing() const
void setSpacing(int space)

See also viewMode.

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

This property holds whether all items in the listview have the same size

Calls C++ function: void QListView::setUniformItemSizes(bool enable).

C++ documentation:

This property holds whether all items in the listview have the same size

This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.

By default, this property is false.

This property was introduced in Qt 4.1.

Access functions:

bool uniformItemSizes() const
void setUniformItemSizes(bool enable)

pub unsafe fn set_view_mode(&mut self, mode: ViewMode)[src]

This property holds the view mode of the QListView.

Calls C++ function: void QListView::setViewMode(QListView::ViewMode mode).

C++ documentation:

This property holds the view mode of the QListView.

This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.

Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode, the default movement is Static (drag and drop disabled); for IconMode, the default movement is Free (drag and drop enabled).

Access functions:

ViewMode viewMode() const
void setViewMode(ViewMode mode)

See also isWrapping, spacing, gridSize, flow, movement, and resizeMode.

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

This property holds the item text word-wrapping policy

Calls C++ function: void QListView::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.

Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.

This property was introduced in Qt 4.2.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

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

This property holds whether the items layout should wrap.

Calls C++ function: void QListView::setWrapping(bool enable).

C++ documentation:

This property holds whether the items layout should wrap.

This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property is false.

Access functions:

bool isWrapping() const
void setWrapping(bool enable)

See also viewMode.

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

This property holds the space around the items in the layout

Calls C++ function: int QListView::spacing() const.

C++ documentation:

This property holds the space around the items in the layout

This property is the size of the empty space that is padded around an item in the layout.

Setting this property when the view is visible will cause the items to be laid out again.

By default, this property contains a value of 0.

Access functions:

int spacing() const
void setSpacing(int space)

See also viewMode.

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

Returns a reference to the staticMetaObject field.

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

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

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

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

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

This property holds whether all items in the listview have the same size

Calls C++ function: bool QListView::uniformItemSizes() const.

C++ documentation:

This property holds whether all items in the listview have the same size

This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.

By default, this property is false.

This property was introduced in Qt 4.1.

Access functions:

bool uniformItemSizes() const
void setUniformItemSizes(bool enable)

pub unsafe fn view_mode(&self) -> ViewMode[src]

This property holds the view mode of the QListView.

Calls C++ function: QListView::ViewMode QListView::viewMode() const.

C++ documentation:

This property holds the view mode of the QListView.

This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.

Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode, the default movement is Static (drag and drop disabled); for IconMode, the default movement is Free (drag and drop enabled).

Access functions:

ViewMode viewMode() const
void setViewMode(ViewMode mode)

See also isWrapping, spacing, gridSize, flow, movement, and resizeMode.

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

Reimplemented from QAbstractItemView::visualRect().

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

C++ documentation:

Reimplemented from QAbstractItemView::visualRect().

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

This property holds the item text word-wrapping policy

Calls C++ function: bool QListView::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.

Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.

This property was introduced in Qt 4.2.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

Methods from Deref<Target = QAbstractItemView>

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

Reset the internal state of the view.

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

C++ documentation:

Reset the internal state of the view.

Warning: This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.

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

Sets the root item to the item at the given index.

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

C++ documentation:

Sets the root item to the item at the given index.

See also rootIndex().

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

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

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

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

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

C++ documentation:

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

See also setSelection(), selectedIndexes(), and clearSelection().

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

Starts editing the item corresponding to the given index if it is editable.

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

C++ documentation:

Starts editing the item corresponding to the given index if it is editable.

Note that this function does not change the current index. Since the current index defines the next and previous items to edit, users may find that keyboard navigation does not work as expected. To provide consistent navigation behavior, call setCurrentIndex() before this function with the same model index.

See also QModelIndex::flags().

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

Deselects all selected items. The current index will not be changed.

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

C++ documentation:

Deselects all selected items. The current index will not be changed.

See also setSelection() and selectAll().

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

Sets the current item to be the item at index.

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

C++ documentation:

Sets the current item to be the item at index.

Unless the current selection mode is NoSelection, the item is also selected. Note that this function also updates the starting position for any new selections the user performs.

To set an item as the current item without selecting it, call

selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);

See also currentIndex(), currentChanged(), and selectionMode.

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

Scrolls the view to the top.

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

C++ documentation:

Scrolls the view to the top.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToBottom().

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

Scrolls the view to the bottom.

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

C++ documentation:

Scrolls the view to the bottom.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToTop().

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

Updates the area occupied by the given index.

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

C++ documentation:

Updates the area occupied by the given index.

This function was introduced in Qt 4.3.

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

This slot is called when items with the given roles are changed in the model. The changed items are those from topLeft to bottomRight inclusive. If just one item is changed topLeft == bottomRight.

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

C++ documentation:

This slot is called when items with the given roles are changed in the model. The changed items are those from topLeft to bottomRight inclusive. If just one item is changed topLeft == bottomRight.

The roles which have been changed can either be an empty container (meaning everything has changed), or a non-empty container with the subset of roles which have changed.

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

This slot is called when rows are inserted. The new rows are those under the given parent from start to end inclusive. The base class implementation calls fetchMore() on the model to check for more data.

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

C++ documentation:

This slot is called when rows are inserted. The new rows are those under the given parent from start to end inclusive. The base class implementation calls fetchMore() on the model to check for more data.

See also rowsAboutToBeRemoved().

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

This slot is called when rows are about to be removed. The deleted rows are those under the given parent from start to end inclusive.

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

C++ documentation:

This slot is called when rows are about to be removed. The deleted rows are those under the given parent from start to end inclusive.

See also rowsInserted().

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

This slot is called when the selection is changed. The previous selection (which may be empty), is specified by deselected, and the new selection by selected.

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

C++ documentation:

This slot is called when the selection is changed. The previous selection (which may be empty), is specified by deselected, and the new selection by selected.

See also setSelection().

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

This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.

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

C++ documentation:

This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.

If you want to know about changes to items see the dataChanged() signal.

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

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

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

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

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

Updates the geometry of the child widgets of the view.

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

C++ documentation:

Updates the geometry of the child widgets of the view.

This function was introduced in Qt 4.4.

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

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

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

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

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

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

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

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

pub fn slot_close_editor(&self) -> Receiver<(*mut QWidget, EndEditHint)>[src]

Closes the given editor, and releases it. The hint is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.

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

C++ documentation:

Closes the given editor, and releases it. The hint is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.

See also edit() and commitData().

pub fn slot_commit_data(&self) -> Receiver<(*mut QWidget,)>[src]

Commit the data in the editor to the model.

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

C++ documentation:

Commit the data in the editor to the model.

See also closeEditor().

pub fn slot_editor_destroyed(&self) -> Receiver<(*mut QObject,)>[src]

This function is called when the given editor has been destroyed.

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

C++ documentation:

This function is called when the given editor has been destroyed.

See also closeEditor().

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

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.

Use the QApplication::mouseButtons() function to get the state of the mouse buttons.

See also activated(), clicked(), doubleClicked(), and entered().

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

This signal is emitted when a mouse button is left-clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is left-clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.

See also activated(), doubleClicked(), entered(), and pressed().

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

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.

See also clicked() and activated().

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

This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.

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

C++ documentation:

This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.

See also clicked(), doubleClicked(), entered(), and pressed().

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

This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.

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

C++ documentation:

This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.

See also viewportEntered(), activated(), clicked(), doubleClicked(), and pressed().

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

This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.

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

C++ documentation:

This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.

See also entered().

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

This property holds the size of items' icons

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

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

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

This property holds whether to draw the background using alternating colors

Calls C++ function: bool QAbstractItemView::alternatingRowColors() const.

C++ documentation:

This property holds whether to draw the background using alternating colors

If this property is true, the item background will be drawn using QPalette::Base and QPalette::AlternateBase; otherwise the background will be drawn using the QPalette::Base color.

By default, this property is false.

Access functions:

bool alternatingRowColors() const
void setAlternatingRowColors(bool enable)

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

This property holds the size of the area when auto scrolling is triggered

Calls C++ function: int QAbstractItemView::autoScrollMargin() const.

C++ documentation:

This property holds the size of the area when auto scrolling is triggered

This property controls the size of the area at the edge of the viewport that triggers autoscrolling. The default value is 16 pixels.

This property was introduced in Qt 4.4.

Access functions:

int autoScrollMargin() const
void setAutoScrollMargin(int margin)

pub unsafe fn clear_selection(&mut self)[src]

Deselects all selected items. The current index will not be changed.

Calls C++ function: [slot] void QAbstractItemView::clearSelection().

C++ documentation:

Deselects all selected items. The current index will not be changed.

See also setSelection() and selectAll().

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

Closes the persistent editor for the item at the given index.

Calls C++ function: void QAbstractItemView::closePersistentEditor(const QModelIndex& index).

C++ documentation:

Closes the persistent editor for the item at the given index.

See also openPersistentEditor().

pub unsafe fn current_index(&self) -> CppBox<QModelIndex>[src]

Returns the model index of the current item.

Calls C++ function: QModelIndex QAbstractItemView::currentIndex() const.

C++ documentation:

Returns the model index of the current item.

See also setCurrentIndex().

pub unsafe fn default_drop_action(&self) -> DropAction[src]

This property holds the drop action that will be used by default in QAbstractItemView::drag()

Calls C++ function: Qt::DropAction QAbstractItemView::defaultDropAction() const.

C++ documentation:

This property holds the drop action that will be used by default in QAbstractItemView::drag()

If the property is not set, the drop action is CopyAction when the supported actions support CopyAction.

This property was introduced in Qt 4.6.

Access functions:

Qt::DropAction defaultDropAction() const
void setDefaultDropAction(Qt::DropAction dropAction)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn do_items_layout(&mut self)[src]

Calls C++ function: virtual [slot] void QAbstractItemView::doItemsLayout().

pub unsafe fn drag_drop_mode(&self) -> DragDropMode[src]

This property holds the drag and drop event the view will act upon

Calls C++ function: QAbstractItemView::DragDropMode QAbstractItemView::dragDropMode() const.

C++ documentation:

This property holds the drag and drop event the view will act upon

This property was introduced in Qt 4.2.

Access functions:

DragDropMode dragDropMode() const
void setDragDropMode(DragDropMode behavior)

See also showDropIndicator and dragDropOverwriteMode.

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

This property holds the view's drag and drop behavior

Calls C++ function: bool QAbstractItemView::dragDropOverwriteMode() const.

C++ documentation:

This property holds the view's drag and drop behavior

If its value is true, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is false, the selected data will be inserted as a new item when the data is dropped. When the data is moved, the item is removed as well.

The default value is false, as in the QListView and QTreeView subclasses. In the QTableView subclass, on the other hand, the property has been set to true.

Note: This is not intended to prevent overwriting of items. The model's implementation of flags() should do that by not returning Qt::ItemIsDropEnabled.

This property was introduced in Qt 4.2.

Access functions:

bool dragDropOverwriteMode() const
void setDragDropOverwriteMode(bool overwrite)

See also dragDropMode.

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

This property holds whether the view supports dragging of its own items

Calls C++ function: bool QAbstractItemView::dragEnabled() const.

C++ documentation:

This property holds whether the view supports dragging of its own items

Access functions:

bool dragEnabled() const
void setDragEnabled(bool enable)

See also showDropIndicator, DragDropMode, dragDropOverwriteMode, and acceptDrops.

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

Starts editing the item corresponding to the given index if it is editable.

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

C++ documentation:

Starts editing the item corresponding to the given index if it is editable.

Note that this function does not change the current index. Since the current index defines the next and previous items to edit, users may find that keyboard navigation does not work as expected. To provide consistent navigation behavior, call setCurrentIndex() before this function with the same model index.

See also QModelIndex::flags().

pub unsafe fn edit_triggers(&self) -> QFlags<EditTrigger>[src]

This property holds which actions will initiate item editing

Calls C++ function: QFlags<QAbstractItemView::EditTrigger> QAbstractItemView::editTriggers() const.

C++ documentation:

This property holds which actions will initiate item editing

This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.

Access functions:

EditTriggers editTriggers() const
void setEditTriggers(EditTriggers triggers)

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

This property holds whether autoscrolling in drag move events is enabled

Calls C++ function: bool QAbstractItemView::hasAutoScroll() const.

C++ documentation:

This property holds whether autoscrolling in drag move events is enabled

If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.

This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.

Access functions:

bool hasAutoScroll() const
void setAutoScroll(bool enable)

pub unsafe fn horizontal_scroll_mode(&self) -> ScrollMode[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: QAbstractItemView::ScrollMode QAbstractItemView::horizontalScrollMode() const.

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn icon_size(&self) -> CppBox<QSize>[src]

This property holds the size of items' icons

Calls C++ function: QSize QAbstractItemView::iconSize() const.

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

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

Returns the model index of the item at the viewport coordinates point.

Calls C++ function: pure virtual QModelIndex QAbstractItemView::indexAt(const QPoint& point) const.

C++ documentation:

Returns the model index of the item at the viewport coordinates point.

In the base class this is a pure virtual function.

See also visualRect().

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

Returns the widget for the item at the given index.

Calls C++ function: QWidget* QAbstractItemView::indexWidget(const QModelIndex& index) const.

C++ documentation:

Returns the widget for the item at the given index.

This function was introduced in Qt 4.1.

See also setIndexWidget().

pub unsafe fn input_method_query(
    &self,
    query: InputMethodQuery
) -> CppBox<QVariant>
[src]

Reimplemented from QWidget::inputMethodQuery().

Calls C++ function: virtual QVariant QAbstractItemView::inputMethodQuery(Qt::InputMethodQuery query) const.

C++ documentation:

Reimplemented from QWidget::inputMethodQuery().

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

Returns whether a persistent editor is open for the item at index index.

Calls C++ function: bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex& index) const.

C++ documentation:

Returns whether a persistent editor is open for the item at index index.

This function was introduced in Qt 5.10.

See also openPersistentEditor() and closePersistentEditor().

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn item_delegate_0a(&self) -> MutPtr<QAbstractItemDelegate>[src]

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegate() const.

C++ documentation:

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

See also setItemDelegate().

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

Returns the item delegate used by this view and model for the given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegate(const QModelIndex& index) const.

C++ documentation:

Returns the item delegate used by this view and model for the given index.

pub unsafe fn item_delegate_for_column(
    &self,
    column: c_int
) -> MutPtr<QAbstractItemDelegate>
[src]

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegateForColumn(int column) const.

C++ documentation:

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForColumn(), itemDelegateForRow(), and itemDelegate().

pub unsafe fn item_delegate_for_row(
    &self,
    row: c_int
) -> MutPtr<QAbstractItemDelegate>
[src]

Returns the item delegate used by this view and model for the given row, or 0 if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegateForRow(int row) const.

C++ documentation:

Returns the item delegate used by this view and model for the given row, or 0 if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForRow(), itemDelegateForColumn(), and setItemDelegate().

Moves to and selects the item best matching the string search. If no item is found nothing happens.

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

C++ documentation:

Moves to and selects the item best matching the string search. If no item is found nothing happens.

In the default implementation, the search is reset if search is empty, or the time interval since the last search has exceeded QApplication::keyboardInputInterval().

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

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

pub unsafe fn model(&self) -> MutPtr<QAbstractItemModel>[src]

Returns the model that this view is presenting.

Calls C++ function: QAbstractItemModel* QAbstractItemView::model() const.

C++ documentation:

Returns the model that this view is presenting.

See also setModel().

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

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

Calls C++ function: void QAbstractItemView::openPersistentEditor(const QModelIndex& index).

C++ documentation:

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

See also closePersistentEditor().

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

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

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

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

pub unsafe fn reset(&mut self)[src]

Reset the internal state of the view.

Calls C++ function: virtual [slot] void QAbstractItemView::reset().

C++ documentation:

Reset the internal state of the view.

Warning: This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.

pub unsafe fn reset_horizontal_scroll_mode(&mut self)[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: void QAbstractItemView::resetHorizontalScrollMode().

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn reset_vertical_scroll_mode(&mut self)[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: void QAbstractItemView::resetVerticalScrollMode().

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

pub unsafe fn root_index(&self) -> CppBox<QModelIndex>[src]

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

Calls C++ function: QModelIndex QAbstractItemView::rootIndex() const.

C++ documentation:

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

See also setRootIndex().

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

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

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

C++ documentation:

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

In the base class this is a pure virtual function.

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

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

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

C++ documentation:

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

In the base class this is a pure virtual function.

pub unsafe fn scroll_to_bottom(&mut self)[src]

Scrolls the view to the bottom.

Calls C++ function: [slot] void QAbstractItemView::scrollToBottom().

C++ documentation:

Scrolls the view to the bottom.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToTop().

pub unsafe fn scroll_to_top(&mut self)[src]

Scrolls the view to the top.

Calls C++ function: [slot] void QAbstractItemView::scrollToTop().

C++ documentation:

Scrolls the view to the top.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToBottom().

pub unsafe fn select_all(&mut self)[src]

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

Calls C++ function: virtual [slot] void QAbstractItemView::selectAll().

C++ documentation:

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

See also setSelection(), selectedIndexes(), and clearSelection().

pub unsafe fn selection_behavior(&self) -> SelectionBehavior[src]

This property holds which selection behavior the view uses

Calls C++ function: QAbstractItemView::SelectionBehavior QAbstractItemView::selectionBehavior() const.

C++ documentation:

This property holds which selection behavior the view uses

This property holds whether selections are done in terms of single items, rows or columns.

Access functions:

QAbstractItemView::SelectionBehavior selectionBehavior() const
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)

See also SelectionMode and SelectionBehavior.

pub unsafe fn selection_mode(&self) -> SelectionMode[src]

This property holds which selection mode the view operates in

Calls C++ function: QAbstractItemView::SelectionMode QAbstractItemView::selectionMode() const.

C++ documentation:

This property holds which selection mode the view operates in

This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.

Access functions:

QAbstractItemView::SelectionMode selectionMode() const
void setSelectionMode(QAbstractItemView::SelectionMode mode)

See also SelectionMode and SelectionBehavior.

pub unsafe fn selection_model(&self) -> MutPtr<QItemSelectionModel>[src]

Returns the current selection model.

Calls C++ function: QItemSelectionModel* QAbstractItemView::selectionModel() const.

C++ documentation:

Returns the current selection model.

See also setSelectionModel() and selectedIndexes().

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

This property holds whether to draw the background using alternating colors

Calls C++ function: void QAbstractItemView::setAlternatingRowColors(bool enable).

C++ documentation:

This property holds whether to draw the background using alternating colors

If this property is true, the item background will be drawn using QPalette::Base and QPalette::AlternateBase; otherwise the background will be drawn using the QPalette::Base color.

By default, this property is false.

Access functions:

bool alternatingRowColors() const
void setAlternatingRowColors(bool enable)

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

This property holds whether autoscrolling in drag move events is enabled

Calls C++ function: void QAbstractItemView::setAutoScroll(bool enable).

C++ documentation:

This property holds whether autoscrolling in drag move events is enabled

If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.

This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.

Access functions:

bool hasAutoScroll() const
void setAutoScroll(bool enable)

pub unsafe fn set_auto_scroll_margin(&mut self, margin: c_int)[src]

This property holds the size of the area when auto scrolling is triggered

Calls C++ function: void QAbstractItemView::setAutoScrollMargin(int margin).

C++ documentation:

This property holds the size of the area when auto scrolling is triggered

This property controls the size of the area at the edge of the viewport that triggers autoscrolling. The default value is 16 pixels.

This property was introduced in Qt 4.4.

Access functions:

int autoScrollMargin() const
void setAutoScrollMargin(int margin)

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

Sets the current item to be the item at index.

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

C++ documentation:

Sets the current item to be the item at index.

Unless the current selection mode is NoSelection, the item is also selected. Note that this function also updates the starting position for any new selections the user performs.

To set an item as the current item without selecting it, call

selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);

See also currentIndex(), currentChanged(), and selectionMode.

pub unsafe fn set_default_drop_action(&mut self, drop_action: DropAction)[src]

This property holds the drop action that will be used by default in QAbstractItemView::drag()

Calls C++ function: void QAbstractItemView::setDefaultDropAction(Qt::DropAction dropAction).

C++ documentation:

This property holds the drop action that will be used by default in QAbstractItemView::drag()

If the property is not set, the drop action is CopyAction when the supported actions support CopyAction.

This property was introduced in Qt 4.6.

Access functions:

Qt::DropAction defaultDropAction() const
void setDefaultDropAction(Qt::DropAction dropAction)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn set_drag_drop_mode(&mut self, behavior: DragDropMode)[src]

This property holds the drag and drop event the view will act upon

Calls C++ function: void QAbstractItemView::setDragDropMode(QAbstractItemView::DragDropMode behavior).

C++ documentation:

This property holds the drag and drop event the view will act upon

This property was introduced in Qt 4.2.

Access functions:

DragDropMode dragDropMode() const
void setDragDropMode(DragDropMode behavior)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn set_drag_drop_overwrite_mode(&mut self, overwrite: bool)[src]

This property holds the view's drag and drop behavior

Calls C++ function: void QAbstractItemView::setDragDropOverwriteMode(bool overwrite).

C++ documentation:

This property holds the view's drag and drop behavior

If its value is true, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is false, the selected data will be inserted as a new item when the data is dropped. When the data is moved, the item is removed as well.

The default value is false, as in the QListView and QTreeView subclasses. In the QTableView subclass, on the other hand, the property has been set to true.

Note: This is not intended to prevent overwriting of items. The model's implementation of flags() should do that by not returning Qt::ItemIsDropEnabled.

This property was introduced in Qt 4.2.

Access functions:

bool dragDropOverwriteMode() const
void setDragDropOverwriteMode(bool overwrite)

See also dragDropMode.

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

This property holds whether the view supports dragging of its own items

Calls C++ function: void QAbstractItemView::setDragEnabled(bool enable).

C++ documentation:

This property holds whether the view supports dragging of its own items

Access functions:

bool dragEnabled() const
void setDragEnabled(bool enable)

See also showDropIndicator, DragDropMode, dragDropOverwriteMode, and acceptDrops.

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

This property holds whether the drop indicator is shown when dragging items and dropping.

Calls C++ function: void QAbstractItemView::setDropIndicatorShown(bool enable).

C++ documentation:

This property holds whether the drop indicator is shown when dragging items and dropping.

Access functions:

bool showDropIndicator() const
void setDropIndicatorShown(bool enable)

See also dragEnabled, DragDropMode, dragDropOverwriteMode, and acceptDrops.

pub unsafe fn set_edit_triggers(&mut self, triggers: QFlags<EditTrigger>)[src]

This property holds which actions will initiate item editing

Calls C++ function: void QAbstractItemView::setEditTriggers(QFlags<QAbstractItemView::EditTrigger> triggers).

C++ documentation:

This property holds which actions will initiate item editing

This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.

Access functions:

EditTriggers editTriggers() const
void setEditTriggers(EditTriggers triggers)

pub unsafe fn set_horizontal_scroll_mode(&mut self, mode: ScrollMode)[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: void QAbstractItemView::setHorizontalScrollMode(QAbstractItemView::ScrollMode mode).

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn set_icon_size(&mut self, size: impl CastInto<Ref<QSize>>)[src]

This property holds the size of items' icons

Calls C++ function: void QAbstractItemView::setIconSize(const QSize& size).

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

pub unsafe fn set_index_widget(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>,
    widget: impl CastInto<MutPtr<QWidget>>
)
[src]

Sets the given widget on the item at the given index, passing the ownership of the widget to the viewport.

Calls C++ function: void QAbstractItemView::setIndexWidget(const QModelIndex& index, QWidget* widget).

C++ documentation:

Sets the given widget on the item at the given index, passing the ownership of the widget to the viewport.

If index is invalid (e.g., if you pass the root index), this function will do nothing.

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 item at the given index.

If index widget A is replaced with index widget B, index widget A will be deleted. For example, in the code snippet below, the QLineEdit object will be deleted.

setIndexWidget(index, new QLineEdit); ... setIndexWidget(index, new QTextEdit);

This function should only be used to display static content within the visible area corresponding to an item of data. If you want to display custom dynamic content or implement a custom editor widget, subclass QItemDelegate instead.

This function was introduced in Qt 4.1.

See also indexWidget() and Delegate Classes.

pub unsafe fn set_item_delegate(
    &mut self,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the item delegate for this view and its model to delegate. This is useful if you want complete control over the editing and display of items.

Calls C++ function: void QAbstractItemView::setItemDelegate(QAbstractItemDelegate* delegate).

C++ documentation:

Sets the item delegate for this view and its model to delegate. This is useful if you want complete control over the editing and display of items.

Any existing delegate will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

See also itemDelegate().

pub unsafe fn set_item_delegate_for_column(
    &mut self,
    column: c_int,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the given item delegate used by this view and model for the given column. All items on column will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Calls C++ function: void QAbstractItemView::setItemDelegateForColumn(int column, QAbstractItemDelegate* delegate).

C++ documentation:

Sets the given item delegate used by this view and model for the given column. All items on column will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Any existing column delegate for column will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Note: If a delegate has been assigned to both a row and a column, the row delegate will take precedence and manage the intersecting cell index.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

This function was introduced in Qt 4.2.

See also itemDelegateForColumn(), setItemDelegateForRow(), and itemDelegate().

pub unsafe fn set_item_delegate_for_row(
    &mut self,
    row: c_int,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the given item delegate used by this view and model for the given row. All items on row will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Calls C++ function: void QAbstractItemView::setItemDelegateForRow(int row, QAbstractItemDelegate* delegate).

C++ documentation:

Sets the given item delegate used by this view and model for the given row. All items on row will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Any existing row delegate for row will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Note: If a delegate has been assigned to both a row and a column, the row delegate (i.e., this delegate) will take precedence and manage the intersecting cell index.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

This function was introduced in Qt 4.2.

See also itemDelegateForRow(), setItemDelegateForColumn(), and itemDelegate().

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

Sets the model for the view to present.

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

C++ documentation:

Sets the model for the view to present.

This function will create and set a new selection model, replacing any model that was previously set with setSelectionModel(). However, the old selection model will not be deleted as it may be shared between several views. We recommend that you delete the old selection model if it is no longer required. This is done with the following code:

QItemSelectionModel *m = view->selectionModel(); view->setModel(new model); delete m;

If both the old model and the old selection model do not have parents, or if their parents are long-lived objects, it may be preferable to call their deleteLater() functions to explicitly delete them.

The view does not take ownership of the model unless it is the model's parent object because the model may be shared between many different views.

See also model(), selectionModel(), and setSelectionModel().

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

Sets the root item to the item at the given index.

Calls C++ function: virtual [slot] void QAbstractItemView::setRootIndex(const QModelIndex& index).

C++ documentation:

Sets the root item to the item at the given index.

See also rootIndex().

pub unsafe fn set_selection_behavior(&mut self, behavior: SelectionBehavior)[src]

This property holds which selection behavior the view uses

Calls C++ function: void QAbstractItemView::setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior).

C++ documentation:

This property holds which selection behavior the view uses

This property holds whether selections are done in terms of single items, rows or columns.

Access functions:

QAbstractItemView::SelectionBehavior selectionBehavior() const
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)

See also SelectionMode and SelectionBehavior.

pub unsafe fn set_selection_mode(&mut self, mode: SelectionMode)[src]

This property holds which selection mode the view operates in

Calls C++ function: void QAbstractItemView::setSelectionMode(QAbstractItemView::SelectionMode mode).

C++ documentation:

This property holds which selection mode the view operates in

This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.

Access functions:

QAbstractItemView::SelectionMode selectionMode() const
void setSelectionMode(QAbstractItemView::SelectionMode mode)

See also SelectionMode and SelectionBehavior.

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

Sets the current selection model to the given selectionModel.

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

C++ documentation:

Sets the current selection model to the given selectionModel.

Note that, if you call setModel() after this function, the given selectionModel will be replaced by one created by the view.

Note: It is up to the application to delete the old selection model if it is no longer needed; i.e., if it is not being used by other views. This will happen automatically when its parent object is deleted. However, if it does not have a parent, or if the parent is a long-lived object, it may be preferable to call its deleteLater() function to explicitly delete it.

See also selectionModel(), setModel(), and clearSelection().

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

This property holds whether item navigation with tab and backtab is enabled.

Calls C++ function: void QAbstractItemView::setTabKeyNavigation(bool enable).

C++ documentation:

This property holds whether item navigation with tab and backtab is enabled.

Access functions:

bool tabKeyNavigation() const
void setTabKeyNavigation(bool enable)

pub unsafe fn set_text_elide_mode(&mut self, mode: TextElideMode)[src]

This property holds the position of the "..." in elided text.

Calls C++ function: void QAbstractItemView::setTextElideMode(Qt::TextElideMode mode).

C++ documentation:

This property holds the position of the "..." in elided text.

The default value for all item views is Qt::ElideRight.

Access functions:

Qt::TextElideMode textElideMode() const
void setTextElideMode(Qt::TextElideMode mode)

pub unsafe fn set_vertical_scroll_mode(&mut self, mode: ScrollMode)[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: void QAbstractItemView::setVerticalScrollMode(QAbstractItemView::ScrollMode mode).

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

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

This property holds whether the drop indicator is shown when dragging items and dropping.

Calls C++ function: bool QAbstractItemView::showDropIndicator() const.

C++ documentation:

This property holds whether the drop indicator is shown when dragging items and dropping.

Access functions:

bool showDropIndicator() const
void setDropIndicatorShown(bool enable)

See also dragEnabled, DragDropMode, dragDropOverwriteMode, and acceptDrops.

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

Returns the width size hint for the specified column or -1 if there is no model.

Calls C++ function: virtual int QAbstractItemView::sizeHintForColumn(int column) const.

C++ documentation:

Returns the width size hint for the specified column or -1 if there is no model.

This function is used in views with a horizontal header to find the size hint for a header section based on the contents of the given column.

See also sizeHintForRow().

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

Returns the size hint for the item with the specified index or an invalid size for invalid indexes.

Calls C++ function: QSize QAbstractItemView::sizeHintForIndex(const QModelIndex& index) const.

C++ documentation:

Returns the size hint for the item with the specified index or an invalid size for invalid indexes.

See also sizeHintForRow() and sizeHintForColumn().

pub unsafe fn size_hint_for_row(&self, row: c_int) -> c_int[src]

Returns the height size hint for the specified row or -1 if there is no model.

Calls C++ function: virtual int QAbstractItemView::sizeHintForRow(int row) const.

C++ documentation:

Returns the height size hint for the specified row or -1 if there is no model.

The returned height is calculated using the size hints of the given row's items, i.e. the returned value is the maximum height among the items. Note that to control the height of a row, you must reimplement the QAbstractItemDelegate::sizeHint() function.

This function is used in views with a vertical header to find the size hint for a header section based on the contents of the given row.

See also sizeHintForColumn().

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

This property holds whether item navigation with tab and backtab is enabled.

Calls C++ function: bool QAbstractItemView::tabKeyNavigation() const.

C++ documentation:

This property holds whether item navigation with tab and backtab is enabled.

Access functions:

bool tabKeyNavigation() const
void setTabKeyNavigation(bool enable)

pub unsafe fn text_elide_mode(&self) -> TextElideMode[src]

This property holds the position of the "..." in elided text.

Calls C++ function: Qt::TextElideMode QAbstractItemView::textElideMode() const.

C++ documentation:

This property holds the position of the "..." in elided text.

The default value for all item views is Qt::ElideRight.

Access functions:

Qt::TextElideMode textElideMode() const
void setTextElideMode(Qt::TextElideMode mode)

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

Updates the area occupied by the given index.

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

C++ documentation:

Updates the area occupied by the given index.

This function was introduced in Qt 4.3.

pub unsafe fn vertical_scroll_mode(&self) -> ScrollMode[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: QAbstractItemView::ScrollMode QAbstractItemView::verticalScrollMode() const.

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

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

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

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

C++ documentation:

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

If your item is displayed in several areas then visualRect should return the primary area that contains index and not the complete area that index might encompasses, touch or cause drawing.

In the base class this is a pure virtual function.

See also indexAt() and visualRegionForSelection().

Trait Implementations

impl CppDeletable for QListView[src]

unsafe fn delete(&mut self)[src]

Destroys the view.

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

C++ documentation:

Destroys the view.

impl Deref for QListView[src]

type Target = QAbstractItemView

The resulting type after dereferencing.

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

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

impl DerefMut for QListView[src]

fn deref_mut(&mut self) -> &mut QAbstractItemView[src]

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

impl DynamicCast<QListView> for QAbstractItemView[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QAbstractItemView>) -> MutPtr<QListView>[src]

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

impl DynamicCast<QListView> for QAbstractScrollArea[src]

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

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

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QListView>
[src]

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

impl DynamicCast<QListView> for QFrame[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QListView>[src]

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

impl DynamicCast<QListView> for QWidget[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QListView>[src]

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

impl DynamicCast<QListView> for QObject[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QListView>[src]

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

impl DynamicCast<QListView> for QPaintDevice[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QListView>[src]

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

impl DynamicCast<QListWidget> for QListView[src]

unsafe fn dynamic_cast(ptr: Ptr<QListView>) -> Ptr<QListWidget>[src]

Calls C++ function: QListWidget* dynamic_cast<QListWidget*>(QListView* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QListView>) -> MutPtr<QListWidget>[src]

Calls C++ function: QListWidget* dynamic_cast<QListWidget*>(QListView* ptr).

impl DynamicCast<QUndoView> for QListView[src]

unsafe fn dynamic_cast(ptr: Ptr<QListView>) -> Ptr<QUndoView>[src]

Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QListView* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QListView>) -> MutPtr<QUndoView>[src]

Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QListView* ptr).

impl StaticDowncast<QListView> for QAbstractItemView[src]

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

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

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractItemView>
) -> MutPtr<QListView>
[src]

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

impl StaticDowncast<QListView> for QAbstractScrollArea[src]

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

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

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QListView>
[src]

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

impl StaticDowncast<QListView> for QFrame[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QListView>[src]

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

impl StaticDowncast<QListView> for QWidget[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QListView>[src]

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

impl StaticDowncast<QListView> for QObject[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QListView>[src]

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

impl StaticDowncast<QListView> for QPaintDevice[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QListView>[src]

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

impl StaticDowncast<QListWidget> for QListView[src]

unsafe fn static_downcast(ptr: Ptr<QListView>) -> Ptr<QListWidget>[src]

Calls C++ function: QListWidget* static_cast<QListWidget*>(QListView* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QListWidget>[src]

Calls C++ function: QListWidget* static_cast<QListWidget*>(QListView* ptr).

impl StaticDowncast<QUndoView> for QListView[src]

unsafe fn static_downcast(ptr: Ptr<QListView>) -> Ptr<QUndoView>[src]

Calls C++ function: QUndoView* static_cast<QUndoView*>(QListView* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QUndoView>[src]

Calls C++ function: QUndoView* static_cast<QUndoView*>(QListView* ptr).

impl StaticUpcast<QAbstractItemView> for QListView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QAbstractItemView>[src]

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

impl StaticUpcast<QAbstractScrollArea> for QListView[src]

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

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

unsafe fn static_upcast_mut(
    ptr: MutPtr<QListView>
) -> MutPtr<QAbstractScrollArea>
[src]

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

impl StaticUpcast<QFrame> for QListView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QFrame>[src]

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

impl StaticUpcast<QListView> for QListWidget[src]

unsafe fn static_upcast(ptr: Ptr<QListWidget>) -> Ptr<QListView>[src]

Calls C++ function: QListView* static_cast<QListView*>(QListWidget* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QListWidget>) -> MutPtr<QListView>[src]

Calls C++ function: QListView* static_cast<QListView*>(QListWidget* ptr).

impl StaticUpcast<QListView> for QUndoView[src]

unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QListView>[src]

Calls C++ function: QListView* static_cast<QListView*>(QUndoView* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QUndoView>) -> MutPtr<QListView>[src]

Calls C++ function: QListView* static_cast<QListView*>(QUndoView* ptr).

impl StaticUpcast<QObject> for QListView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QObject>[src]

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

impl StaticUpcast<QPaintDevice> for QListView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QPaintDevice>[src]

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

impl StaticUpcast<QWidget> for QListView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QListView>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QListView* 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.