[][src]Struct qt_widgets::QTableWidget

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

The QTableWidget class provides an item-based table view with a default model.

C++ class: QTableWidget.

C++ documentation:

The QTableWidget class provides an item-based table view with a default model.

Table widgets provide standard table display facilities for applications. The items in a QTableWidget are provided by QTableWidgetItem.

If you want a table that uses your own data model you should use QTableView rather than this class.

Table widgets can be constructed with the required numbers of rows and columns:

tableWidget = new QTableWidget(12, 3, this);

Alternatively, tables can be constructed without a given size and resized later:

tableWidget = new QTableWidget(this); tableWidget->setRowCount(10); tableWidget->setColumnCount(5);

Items are created ouside the table (with no parent widget) and inserted into the table with setItem():

QTableWidgetItem newItem = new QTableWidgetItem(tr("%1").arg( (row+1)(column+1))); tableWidget->setItem(row, column, newItem);

If you want to enable sorting in your table widget, do so after you have populated it with items, otherwise sorting may interfere with the insertion order (see setItem() for details).

Tables can be given both horizontal and vertical headers. The simplest way to create the headers is to supply a list of strings to the setHorizontalHeaderLabels() and setVerticalHeaderLabels() functions. These will provide simple textual headers for the table's columns and rows. More sophisticated headers can be created from existing table items that are usually constructed outside the table. For example, we can construct a table item with an icon and aligned text, and use it as the header for a particular column:

QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(tr("Cubes")); cubesHeaderItem->setIcon(QIcon(QPixmap(":/Images/cubed.png"))); cubesHeaderItem->setTextAlignment(Qt::AlignVCenter);

The number of rows in the table can be found with rowCount(), and the number of columns with columnCount(). The table can be cleared with the clear() function.

Methods

impl QTableWidget[src]

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

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

C++ documentation:

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

Inserts an empty row into the table at row.

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

C++ documentation:

Inserts an empty row into the table at row.

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

Inserts an empty column into the table at column.

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

C++ documentation:

Inserts an empty column into the table at column.

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

Removes the row row and all its items from the table.

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

C++ documentation:

Removes the row row and all its items from the table.

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

Removes the column column and all its items from the table.

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

C++ documentation:

Removes the column column and all its items from the table.

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

Removes all items in the view. This will also remove all selections and headers. If you don't want to remove the headers, use QTableWidget::clearContents(). The table dimensions stay the same.

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

C++ documentation:

Removes all items in the view. This will also remove all selections and headers. If you don't want to remove the headers, use QTableWidget::clearContents(). The table dimensions stay the same.

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

Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.

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

C++ documentation:

Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.

This function was introduced in Qt 4.2.

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

This signal is emitted whenever an item in the table is pressed. The item specified is the item that was pressed.

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

C++ documentation:

This signal is emitted whenever an item in the table is pressed. The item specified is the item that was pressed.

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

This signal is emitted whenever an item in the table is clicked. The item specified is the item that was clicked.

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

C++ documentation:

This signal is emitted whenever an item in the table is clicked. The item specified is the item that was clicked.

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

This signal is emitted whenever an item in the table is double clicked. The item specified is the item that was double clicked.

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

C++ documentation:

This signal is emitted whenever an item in the table is double clicked. The item specified is the item that was double clicked.

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

This signal is emitted when the specified item has been activated

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

C++ documentation:

This signal is emitted when the specified item has been activated

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

This signal is emitted when the mouse cursor enters an item. The item is the item entered.

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

C++ documentation:

This signal is emitted when the mouse cursor enters an item. The item is the item entered.

This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.

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

This signal is emitted whenever the data of item has changed.

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

C++ documentation:

This signal is emitted whenever the data of item has changed.

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

This signal is emitted whenever the current item changes. The previous item is the item that previously had the focus, current is the new current item.

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

C++ documentation:

This signal is emitted whenever the current item changes. The previous item is the item that previously had the focus, current is the new current item.

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

This signal is emitted whenever the selection changes.

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

C++ documentation:

This signal is emitted whenever the selection changes.

See also selectedItems() and QTableWidgetItem::isSelected().

pub fn cell_pressed(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted whenever a cell in the table is pressed. The row and column specified is the cell that was pressed.

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

C++ documentation:

This signal is emitted whenever a cell in the table is pressed. The row and column specified is the cell that was pressed.

This function was introduced in Qt 4.1.

pub fn cell_clicked(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted whenever a cell in the table is clicked. The row and column specified is the cell that was clicked.

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

C++ documentation:

This signal is emitted whenever a cell in the table is clicked. The row and column specified is the cell that was clicked.

This function was introduced in Qt 4.1.

pub fn cell_double_clicked(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted whenever a cell in the table is double clicked. The row and column specified is the cell that was double clicked.

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

C++ documentation:

This signal is emitted whenever a cell in the table is double clicked. The row and column specified is the cell that was double clicked.

This function was introduced in Qt 4.1.

pub fn cell_activated(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted when the cell specified by row and column has been activated

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

C++ documentation:

This signal is emitted when the cell specified by row and column has been activated

This function was introduced in Qt 4.1.

pub fn cell_entered(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted when the mouse cursor enters a cell. The cell is specified by row and column.

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

C++ documentation:

This signal is emitted when the mouse cursor enters a cell. The cell is specified by row and column.

This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.

This function was introduced in Qt 4.1.

pub fn cell_changed(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted whenever the data of the item in the cell specified by row and column has changed.

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

C++ documentation:

This signal is emitted whenever the data of the item in the cell specified by row and column has changed.

This function was introduced in Qt 4.1.

pub fn current_cell_changed(&self) -> Signal<(c_int, c_int, c_int, c_int)>[src]

This signal is emitted whenever the current cell changes. The cell specified by previousRow and previousColumn is the cell that previously had the focus, the cell specified by currentRow and currentColumn is the new current cell.

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

C++ documentation:

This signal is emitted whenever the current cell changes. The cell specified by previousRow and previousColumn is the cell that previously had the focus, the cell specified by currentRow and currentColumn is the new current cell.

This function was introduced in Qt 4.1.

pub unsafe fn cell_widget(&self, row: c_int, column: c_int) -> QPtr<QWidget>[src]

Returns the widget displayed in the cell in the given row and column.

Calls C++ function: QWidget* QTableWidget::cellWidget(int row, int column) const.

C++ documentation:

Returns the widget displayed in the cell in the given row and column.

Note: The table takes ownership of the widget.

This function was introduced in Qt 4.1.

See also setCellWidget().

pub unsafe fn clear(&self)[src]

Removes all items in the view. This will also remove all selections and headers. If you don't want to remove the headers, use QTableWidget::clearContents(). The table dimensions stay the same.

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

C++ documentation:

Removes all items in the view. This will also remove all selections and headers. If you don't want to remove the headers, use QTableWidget::clearContents(). The table dimensions stay the same.

pub unsafe fn clear_contents(&self)[src]

Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.

Calls C++ function: [slot] void QTableWidget::clearContents().

C++ documentation:

Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.

This function was introduced in Qt 4.2.

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

Closes the persistent editor for item.

Calls C++ function: void QTableWidget::closePersistentEditor(QTableWidgetItem* item).

C++ documentation:

Closes the persistent editor for item.

See also openPersistentEditor().

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

Returns the column for the item.

Calls C++ function: int QTableWidget::column(const QTableWidgetItem* item) const.

C++ documentation:

Returns the column for the item.

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

This property holds the number of columns in the table

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

C++ documentation:

This property holds the number of columns in the table

By default, for a table constructed without row and column counts, this property contains a value of 0.

Access functions:

int columnCount() const
void setColumnCount(int columns)

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

Returns the column of the current item.

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

C++ documentation:

Returns the column of the current item.

See also currentRow() and setCurrentCell().

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

Returns the current item.

Calls C++ function: QTableWidgetItem* QTableWidget::currentItem() const.

C++ documentation:

Returns the current item.

See also setCurrentItem().

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

Returns the row of the current item.

Calls C++ function: int QTableWidget::currentRow() const.

C++ documentation:

Returns the row of the current item.

See also currentColumn() and setCurrentCell().

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

Starts editing the item if it is editable.

Calls C++ function: void QTableWidget::editItem(QTableWidgetItem* item).

C++ documentation:

Starts editing the item if it is editable.

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

Finds items that matches the text using the given flags.

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

C++ documentation:

Finds items that matches the text using the given flags.

pub unsafe fn horizontal_header_item(
    &self,
    column: c_int
) -> Ptr<QTableWidgetItem>
[src]

Returns the horizontal header item for column, column, if one has been set; otherwise returns 0.

Calls C++ function: QTableWidgetItem* QTableWidget::horizontalHeaderItem(int column) const.

C++ documentation:

Returns the horizontal header item for column, column, if one has been set; otherwise returns 0.

See also setHorizontalHeaderItem().

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

Inserts an empty column into the table at column.

Calls C++ function: [slot] void QTableWidget::insertColumn(int column).

C++ documentation:

Inserts an empty column into the table at column.

pub unsafe fn insert_row(&self, row: c_int)[src]

Inserts an empty row into the table at row.

Calls C++ function: [slot] void QTableWidget::insertRow(int row).

C++ documentation:

Inserts an empty row into the table at row.

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

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

Calls C++ function: bool QTableWidget::isItemSelected(const QTableWidgetItem* item) const.

C++ documentation:

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

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

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

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

Returns whether a persistent editor is open for item item.

Calls C++ function: bool QTableWidget::isPersistentEditorOpen(QTableWidgetItem* item) const.

C++ documentation:

Returns whether a persistent editor is open for item item.

This function was introduced in Qt 5.10.

See also openPersistentEditor() and closePersistentEditor().

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

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

pub unsafe fn item(&self, row: c_int, column: c_int) -> Ptr<QTableWidgetItem>[src]

Returns the item for the given row and column if one has been set; otherwise returns 0.

Calls C++ function: QTableWidgetItem* QTableWidget::item(int row, int column) const.

C++ documentation:

Returns the item for the given row and column if one has been set; otherwise returns 0.

See also setItem().

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

Returns a pointer to the item at the given point, or returns 0 if point is not covered by an item in the table widget.

Calls C++ function: QTableWidgetItem* QTableWidget::itemAt(const QPoint& p) const.

C++ documentation:

Returns a pointer to the item at the given point, or returns 0 if point is not covered by an item in the table widget.

See also item().

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

Returns the item at the position equivalent to QPoint(ax, ay) in the table widget's coordinate system, or returns 0 if the specified point is not covered by an item in the table widget.

Calls C++ function: QTableWidgetItem* QTableWidget::itemAt(int x, int y) const.

C++ documentation:

Returns the item at the position equivalent to QPoint(ax, ay) in the table widget's coordinate system, or returns 0 if the specified point is not covered by an item in the table widget.

See also item().

pub unsafe fn item_prototype(&self) -> Ptr<QTableWidgetItem>[src]

Returns the item prototype used by the table.

Calls C++ function: const QTableWidgetItem* QTableWidget::itemPrototype() const.

C++ documentation:

Returns the item prototype used by the table.

See also setItemPrototype().

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

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

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

Creates a new table view with the given parent.

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

C++ documentation:

Creates a new table view with the given parent.

pub unsafe fn new_3a(
    rows: c_int,
    columns: c_int,
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QTableWidget>
[src]

Creates a new table view with the given rows and columns, and with the given parent.

Calls C++ function: [constructor] void QTableWidget::QTableWidget(int rows, int columns, QWidget* parent = …).

C++ documentation:

Creates a new table view with the given rows and columns, and with the given parent.

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

The QTableWidget class provides an item-based table view with a default model.

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

C++ documentation:

The QTableWidget class provides an item-based table view with a default model.

Table widgets provide standard table display facilities for applications. The items in a QTableWidget are provided by QTableWidgetItem.

If you want a table that uses your own data model you should use QTableView rather than this class.

Table widgets can be constructed with the required numbers of rows and columns:

tableWidget = new QTableWidget(12, 3, this);

Alternatively, tables can be constructed without a given size and resized later:

tableWidget = new QTableWidget(this); tableWidget->setRowCount(10); tableWidget->setColumnCount(5);

Items are created ouside the table (with no parent widget) and inserted into the table with setItem():

QTableWidgetItem newItem = new QTableWidgetItem(tr("%1").arg( (row+1)(column+1))); tableWidget->setItem(row, column, newItem);

If you want to enable sorting in your table widget, do so after you have populated it with items, otherwise sorting may interfere with the insertion order (see setItem() for details).

Tables can be given both horizontal and vertical headers. The simplest way to create the headers is to supply a list of strings to the setHorizontalHeaderLabels() and setVerticalHeaderLabels() functions. These will provide simple textual headers for the table's columns and rows. More sophisticated headers can be created from existing table items that are usually constructed outside the table. For example, we can construct a table item with an icon and aligned text, and use it as the header for a particular column:

QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(tr("Cubes")); cubesHeaderItem->setIcon(QIcon(QPixmap(":/Images/cubed.png"))); cubesHeaderItem->setTextAlignment(Qt::AlignVCenter);

The number of rows in the table can be found with rowCount(), and the number of columns with columnCount(). The table can be cleared with the clear() function.

pub unsafe fn new_2a(rows: c_int, columns: c_int) -> QBox<QTableWidget>[src]

Creates a new table view with the given rows and columns, and with the given parent.

Calls C++ function: [constructor] void QTableWidget::QTableWidget(int rows, int columns).

C++ documentation:

Creates a new table view with the given rows and columns, and with the given parent.

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

Opens an editor for the give item. The editor remains open after editing.

Calls C++ function: void QTableWidget::openPersistentEditor(QTableWidgetItem* item).

C++ documentation:

Opens an editor for the give item. The editor remains open after editing.

See also closePersistentEditor().

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

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

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

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

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

Removes the widget set on the cell indicated by row and column.

Calls C++ function: void QTableWidget::removeCellWidget(int row, int column).

C++ documentation:

Removes the widget set on the cell indicated by row and column.

This function was introduced in Qt 4.3.

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

Removes the column column and all its items from the table.

Calls C++ function: [slot] void QTableWidget::removeColumn(int column).

C++ documentation:

Removes the column column and all its items from the table.

pub unsafe fn remove_row(&self, row: c_int)[src]

Removes the row row and all its items from the table.

Calls C++ function: [slot] void QTableWidget::removeRow(int row).

C++ documentation:

Removes the row row and all its items from the table.

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

Returns the row for the item.

Calls C++ function: int QTableWidget::row(const QTableWidgetItem* item) const.

C++ documentation:

Returns the row for the item.

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

This property holds the number of rows in the table

Calls C++ function: int QTableWidget::rowCount() const.

C++ documentation:

This property holds the number of rows in the table

By default, for a table constructed without row and column counts, this property contains a value of 0.

Access functions:

int rowCount() const
void setRowCount(int rows)

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

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

C++ documentation:

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

C++ documentation:

Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.

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

Returns a list of all selected items.

Calls C++ function: QList<QTableWidgetItem*> QTableWidget::selectedItems() const.

C++ documentation:

Returns a list of all selected items.

This function returns a list of pointers to the contents of the selected cells. Use the selectedIndexes() function to retrieve the complete selection including empty cells.

See also selectedIndexes().

pub unsafe fn selected_ranges(
    &self
) -> CppBox<QListOfQTableWidgetSelectionRange>
[src]

Returns a list of all selected ranges.

Calls C++ function: QList<QTableWidgetSelectionRange> QTableWidget::selectedRanges() const.

C++ documentation:

Returns a list of all selected ranges.

See also QTableWidgetSelectionRange.

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

Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to the table.

Calls C++ function: void QTableWidget::setCellWidget(int row, int column, QWidget* widget).

C++ documentation:

Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to the table.

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

setCellWidget(row, column, new QLineEdit); ... setCellWidget(row, column, new QTextEdit);

This function was introduced in Qt 4.1.

See also cellWidget().

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

Sets the number of columns in this table's model to columns. If this is less than columnCount(), the data in the unwanted columns is discarded.

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

C++ documentation:

Sets the number of columns in this table's model to columns. If this is less than columnCount(), the data in the unwanted columns is discarded.

Note: Setter function for property columnCount.

See also columnCount() and setRowCount().

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

Sets the current cell to be the cell at position (row, column).

Calls C++ function: void QTableWidget::setCurrentCell(int row, int column).

C++ documentation:

Sets the current cell to be the cell at position (row, column).

Depending on the current selection mode, the cell may also be selected.

This function was introduced in Qt 4.1.

See also setCurrentItem(), currentRow(), and currentColumn().

pub unsafe fn set_current_cell_3a(
    &self,
    row: c_int,
    column: c_int,
    command: QFlags<SelectionFlag>
)
[src]

Sets the current cell to be the cell at position (row, column), using the given command.

Calls C++ function: void QTableWidget::setCurrentCell(int row, int column, QFlags<QItemSelectionModel::SelectionFlag> command).

C++ documentation:

Sets the current cell to be the cell at position (row, column), using the given command.

This function was introduced in Qt 4.4.

See also setCurrentItem(), currentRow(), and currentColumn().

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

Sets the current item to item.

Calls C++ function: void QTableWidget::setCurrentItem(QTableWidgetItem* item).

C++ documentation:

Sets the current item to item.

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

See also currentItem() and setCurrentCell().

pub unsafe fn set_current_item_2a(
    &self,
    item: impl CastInto<Ptr<QTableWidgetItem>>,
    command: QFlags<SelectionFlag>
)
[src]

Sets the current item to be item, using the given command.

Calls C++ function: void QTableWidget::setCurrentItem(QTableWidgetItem* item, QFlags<QItemSelectionModel::SelectionFlag> command).

C++ documentation:

Sets the current item to be item, using the given command.

This function was introduced in Qt 4.4.

See also currentItem() and setCurrentCell().

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

Sets the horizontal header item for column column to item. If necessary, the column count is increased to fit the item. The previous header item (if there was one) is deleted.

Calls C++ function: void QTableWidget::setHorizontalHeaderItem(int column, QTableWidgetItem* item).

C++ documentation:

Sets the horizontal header item for column column to item. If necessary, the column count is increased to fit the item. The previous header item (if there was one) is deleted.

See also horizontalHeaderItem().

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

Sets the horizontal header labels using labels.

Calls C++ function: void QTableWidget::setHorizontalHeaderLabels(const QStringList& labels).

C++ documentation:

Sets the horizontal header labels using labels.

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

Sets the item for the given row and column to item.

Calls C++ function: void QTableWidget::setItem(int row, int column, QTableWidgetItem* item).

C++ documentation:

Sets the item for the given row and column to item.

The table takes ownership of the item.

Note that if sorting is enabled (see sortingEnabled) and column is the current sort column, the row will be moved to the sorted position determined by item.

If you want to set several items of a particular row (say, by calling setItem() in a loop), you may want to turn off sorting before doing so, and turn it back on afterwards; this will allow you to use the same row argument for all items in the same row (i.e. setItem() will not move the row).

See also item() and takeItem().

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

Sets the item prototype for the table to the specified item.

Calls C++ function: void QTableWidget::setItemPrototype(const QTableWidgetItem* item).

C++ documentation:

Sets the item prototype for the table to the specified item.

The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing in an empty cell. This is useful when you have a QTableWidgetItem subclass and want to make sure that QTableWidget creates instances of your subclass.

The table takes ownership of the prototype.

See also itemPrototype().

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

Selects or deselects item depending on select.

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

C++ documentation:

Selects or deselects item depending on select.

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

See also isItemSelected().

pub unsafe fn set_range_selected(
    &self,
    range: impl CastInto<Ref<QTableWidgetSelectionRange>>,
    select: bool
)
[src]

Selects or deselects the range depending on select.

Calls C++ function: void QTableWidget::setRangeSelected(const QTableWidgetSelectionRange& range, bool select).

C++ documentation:

Selects or deselects the range depending on select.

pub unsafe fn set_row_count(&self, rows: c_int)[src]

Sets the number of rows in this table's model to rows. If this is less than rowCount(), the data in the unwanted rows is discarded.

Calls C++ function: void QTableWidget::setRowCount(int rows).

C++ documentation:

Sets the number of rows in this table's model to rows. If this is less than rowCount(), the data in the unwanted rows is discarded.

Note: Setter function for property rowCount.

See also rowCount() and setColumnCount().

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

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

pub unsafe fn set_vertical_header_item(
    &self,
    row: c_int,
    item: impl CastInto<Ptr<QTableWidgetItem>>
)
[src]

Sets the vertical header item for row row to item.

Calls C++ function: void QTableWidget::setVerticalHeaderItem(int row, QTableWidgetItem* item).

C++ documentation:

Sets the vertical header item for row row to item.

See also verticalHeaderItem().

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

Sets the vertical header labels using labels.

Calls C++ function: void QTableWidget::setVerticalHeaderLabels(const QStringList& labels).

C++ documentation:

Sets the vertical header labels using labels.

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

Sorts all the rows in the table widget based on column and order.

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

C++ documentation:

Sorts all the rows in the table widget based on column and order.

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

Sorts all the rows in the table widget based on column and order.

Calls C++ function: void QTableWidget::sortItems(int column).

C++ documentation:

Sorts all the rows in the table widget based on column and order.

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

Returns a reference to the staticMetaObject field.

pub unsafe fn take_horizontal_header_item(
    &self,
    column: c_int
) -> Ptr<QTableWidgetItem>
[src]

Removes the horizontal header item at column from the header without deleting it.

Calls C++ function: QTableWidgetItem* QTableWidget::takeHorizontalHeaderItem(int column).

C++ documentation:

Removes the horizontal header item at column from the header without deleting it.

This function was introduced in Qt 4.1.

pub unsafe fn take_item(
    &self,
    row: c_int,
    column: c_int
) -> Ptr<QTableWidgetItem>
[src]

Removes the item at row and column from the table without deleting it.

Calls C++ function: QTableWidgetItem* QTableWidget::takeItem(int row, int column).

C++ documentation:

Removes the item at row and column from the table without deleting it.

pub unsafe fn take_vertical_header_item(
    &self,
    row: c_int
) -> Ptr<QTableWidgetItem>
[src]

Removes the vertical header item at row from the header without deleting it.

Calls C++ function: QTableWidgetItem* QTableWidget::takeVerticalHeaderItem(int row).

C++ documentation:

Removes the vertical header item at row from the header without deleting it.

This function was introduced in Qt 4.1.

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

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

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

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

pub unsafe fn vertical_header_item(&self, row: c_int) -> Ptr<QTableWidgetItem>[src]

Returns the vertical header item for row row.

Calls C++ function: QTableWidgetItem* QTableWidget::verticalHeaderItem(int row) const.

C++ documentation:

Returns the vertical header item for row row.

See also setVerticalHeaderItem().

pub unsafe fn visual_column(&self, logical_column: c_int) -> c_int[src]

Returns the visual column of the given logicalColumn.

Calls C++ function: int QTableWidget::visualColumn(int logicalColumn) const.

C++ documentation:

Returns the visual column of the given logicalColumn.

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

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

Calls C++ function: QRect QTableWidget::visualItemRect(const QTableWidgetItem* item) const.

C++ documentation:

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

pub unsafe fn visual_row(&self, logical_row: c_int) -> c_int[src]

Returns the visual row of the given logicalRow.

Calls C++ function: int QTableWidget::visualRow(int logicalRow) const.

C++ documentation:

Returns the visual row of the given logicalRow.

Methods from Deref<Target = QTableView>

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

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

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

C++ documentation:

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

See also selectColumn().

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

Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.

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

C++ documentation:

Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.

See also selectRow().

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

Hide the given row.

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

C++ documentation:

Hide the given row.

See also showRow() and hideColumn().

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

Hide the given column.

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

C++ documentation:

Hide the given column.

See also showColumn() and hideRow().

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

Show the given row.

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

C++ documentation:

Show the given row.

See also hideRow() and showColumn().

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

Show the given column.

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

C++ documentation:

Show the given column.

See also hideColumn() and showRow().

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

Resizes the given row based on the size hints of the delegate used to render each item in the row.

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

C++ documentation:

Resizes the given row based on the size hints of the delegate used to render each item in the row.

See also resizeRowsToContents(), sizeHintForRow(), and QHeaderView::resizeContentsPrecision().

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

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

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

C++ documentation:

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

See also resizeRowToContents(), sizeHintForRow(), and QHeaderView::resizeContentsPrecision().

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

Resizes the given column based on the size hints of the delegate used to render each item in the column.

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

C++ documentation:

Resizes the given column based on the size hints of the delegate used to render each item in the column.

Note: Only visible columns will be resized. Reimplement sizeHintForColumn() to resize hidden columns as well.

See also resizeColumnsToContents(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

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

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

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

C++ documentation:

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

See also resizeColumnToContents(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

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

Sorts the model by the values in the given column in the given order.

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

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

Sorts the model by the values in the given column in the given order.

This function was introduced in Qt 4.2.

See also sortingEnabled.

pub fn slot_set_show_grid(&self) -> Receiver<(bool,)>[src]

This property holds whether the grid is shown

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

C++ documentation:

This property holds whether the grid is shown

If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.

Access functions:

bool showGrid() const
void setShowGrid(bool show)

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

This slot is called to change the index of the given row in the table view. The old index is specified by oldIndex, and the new index by newIndex.

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

C++ documentation:

This slot is called to change the index of the given row in the table view. The old index is specified by oldIndex, and the new index by newIndex.

See also columnMoved().

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

This slot is called to change the index of the given column in the table view. The old index is specified by oldIndex, and the new index by newIndex.

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

C++ documentation:

This slot is called to change the index of the given column in the table view. The old index is specified by oldIndex, and the new index by newIndex.

See also rowMoved().

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

This slot is called to change the height of the given row. The old height is specified by oldHeight, and the new height by newHeight.

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

C++ documentation:

This slot is called to change the height of the given row. The old height is specified by oldHeight, and the new height by newHeight.

See also columnResized().

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

This slot is called to change the width of the given column. The old width is specified by oldWidth, and the new width by newWidth.

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

C++ documentation:

This slot is called to change the width of the given column. The old width is specified by oldWidth, and the new width by newWidth.

See also rowResized().

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

This slot is called whenever rows are added or deleted. The previous number of rows is specified by oldCount, and the new number of rows is specified by newCount.

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

C++ documentation:

This slot is called whenever rows are added or deleted. The previous number of rows is specified by oldCount, and the new number of rows is specified by newCount.

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

This slot is called whenever columns are added or deleted. The previous number of columns is specified by oldCount, and the new number of columns is specified by newCount.

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

C++ documentation:

This slot is called whenever columns are added or deleted. The previous number of columns is specified by oldCount, and the new number of columns is specified by newCount.

pub unsafe fn clear_spans(&self)[src]

Removes all row and column spans in the table view.

Calls C++ function: void QTableView::clearSpans().

C++ documentation:

Removes all row and column spans in the table view.

This function was introduced in Qt 4.4.

See also setSpan().

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

Returns the column in which the given x-coordinate, x, in contents coordinates is located.

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

C++ documentation:

Returns the column in which the given x-coordinate, x, in contents coordinates is located.

Note: This function returns -1 if the given coordinate is not valid (has no column).

See also rowAt().

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

Returns the column span of the table element at (row, column). The default is 1.

Calls C++ function: int QTableView::columnSpan(int row, int column) const.

C++ documentation:

Returns the column span of the table element at (row, column). The default is 1.

This function was introduced in Qt 4.2.

See also setSpan() and rowSpan().

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

Returns the x-coordinate in contents coordinates of the given column.

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

C++ documentation:

Returns the x-coordinate in contents coordinates of the given column.

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

Returns the width of the given column.

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

C++ documentation:

Returns the width of the given column.

See also setColumnWidth(), resizeColumnToContents(), and rowHeight().

pub unsafe fn do_items_layout(&self)[src]

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

pub unsafe fn grid_style(&self) -> PenStyle[src]

This property holds the pen style used to draw the grid.

Calls C++ function: Qt::PenStyle QTableView::gridStyle() const.

C++ documentation:

This property holds the pen style used to draw the grid.

This property holds the style used when drawing the grid (see showGrid).

Access functions:

Qt::PenStyle gridStyle() const
void setGridStyle(Qt::PenStyle style)

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

Hide the given column.

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

C++ documentation:

Hide the given column.

See also showColumn() and hideRow().

pub unsafe fn hide_row(&self, row: c_int)[src]

Hide the given row.

Calls C++ function: [slot] void QTableView::hideRow(int row).

C++ documentation:

Hide the given row.

See also showRow() and hideColumn().

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

Returns the table view's horizontal header.

Calls C++ function: QHeaderView* QTableView::horizontalHeader() const.

C++ documentation:

Returns the table view's horizontal header.

See also setHorizontalHeader(), verticalHeader(), and QAbstractItemModel::headerData().

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

Reimplemented from QAbstractItemView::indexAt().

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

C++ documentation:

Reimplemented from QAbstractItemView::indexAt().

Returns the index position of the model item corresponding to the table item at position pos in contents coordinates.

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

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

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

C++ documentation:

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

See also isRowHidden().

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

This property holds whether the button in the top-left corner is enabled

Calls C++ function: bool QTableView::isCornerButtonEnabled() const.

C++ documentation:

This property holds whether the button in the top-left corner is enabled

If this property is true then button in the top-left corner of the table view is enabled. Clicking on this button will select all the cells in the table view.

This property is true by default.

This property was introduced in Qt 4.3.

Access functions:

bool isCornerButtonEnabled() const
void setCornerButtonEnabled(bool enable)

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

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

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

C++ documentation:

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

See also isColumnHidden().

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

This property holds whether sorting is enabled

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

C++ documentation:

This property holds whether sorting is enabled

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

Note: . Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order.

This property was introduced in Qt 4.2.

Access functions:

bool isSortingEnabled() const
void setSortingEnabled(bool enable)

See also sortByColumn().

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

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

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

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

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

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

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

Resizes the given column based on the size hints of the delegate used to render each item in the column.

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

C++ documentation:

Resizes the given column based on the size hints of the delegate used to render each item in the column.

Note: Only visible columns will be resized. Reimplement sizeHintForColumn() to resize hidden columns as well.

See also resizeColumnsToContents(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

pub unsafe fn resize_columns_to_contents(&self)[src]

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

Calls C++ function: [slot] void QTableView::resizeColumnsToContents().

C++ documentation:

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

See also resizeColumnToContents(), sizeHintForColumn(), and QHeaderView::resizeContentsPrecision().

pub unsafe fn resize_row_to_contents(&self, row: c_int)[src]

Resizes the given row based on the size hints of the delegate used to render each item in the row.

Calls C++ function: [slot] void QTableView::resizeRowToContents(int row).

C++ documentation:

Resizes the given row based on the size hints of the delegate used to render each item in the row.

See also resizeRowsToContents(), sizeHintForRow(), and QHeaderView::resizeContentsPrecision().

pub unsafe fn resize_rows_to_contents(&self)[src]

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

Calls C++ function: [slot] void QTableView::resizeRowsToContents().

C++ documentation:

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

See also resizeRowToContents(), sizeHintForRow(), and QHeaderView::resizeContentsPrecision().

pub unsafe fn row_at(&self, y: c_int) -> c_int[src]

Returns the row in which the given y-coordinate, y, in contents coordinates is located.

Calls C++ function: int QTableView::rowAt(int y) const.

C++ documentation:

Returns the row in which the given y-coordinate, y, in contents coordinates is located.

Note: This function returns -1 if the given coordinate is not valid (has no row).

See also columnAt().

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

Returns the height of the given row.

Calls C++ function: int QTableView::rowHeight(int row) const.

C++ documentation:

Returns the height of the given row.

See also setRowHeight(), resizeRowToContents(), and columnWidth().

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

Returns the row span of the table element at (row, column). The default is 1.

Calls C++ function: int QTableView::rowSpan(int row, int column) const.

C++ documentation:

Returns the row span of the table element at (row, column). The default is 1.

This function was introduced in Qt 4.2.

See also setSpan() and columnSpan().

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

Returns the y-coordinate in contents coordinates of the given row.

Calls C++ function: int QTableView::rowViewportPosition(int row) const.

C++ documentation:

Returns the y-coordinate in contents coordinates of the given row.

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

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

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

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

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

Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.

Calls C++ function: [slot] void QTableView::selectColumn(int column).

C++ documentation:

Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.

See also selectRow().

pub unsafe fn select_row(&self, row: c_int)[src]

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

Calls C++ function: [slot] void QTableView::selectRow(int row).

C++ documentation:

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

See also selectColumn().

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

If hide is true the given column will be hidden; otherwise it will be shown.

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

C++ documentation:

If hide is true the given column will be hidden; otherwise it will be shown.

See also isColumnHidden() and setRowHidden().

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

Sets the width of the given column to be width.

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

C++ documentation:

Sets the width of the given column to be width.

This function was introduced in Qt 4.1.

See also columnWidth().

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

This property holds whether the button in the top-left corner is enabled

Calls C++ function: void QTableView::setCornerButtonEnabled(bool enable).

C++ documentation:

This property holds whether the button in the top-left corner is enabled

If this property is true then button in the top-left corner of the table view is enabled. Clicking on this button will select all the cells in the table view.

This property is true by default.

This property was introduced in Qt 4.3.

Access functions:

bool isCornerButtonEnabled() const
void setCornerButtonEnabled(bool enable)

pub unsafe fn set_grid_style(&self, style: PenStyle)[src]

This property holds the pen style used to draw the grid.

Calls C++ function: void QTableView::setGridStyle(Qt::PenStyle style).

C++ documentation:

This property holds the pen style used to draw the grid.

This property holds the style used when drawing the grid (see showGrid).

Access functions:

Qt::PenStyle gridStyle() const
void setGridStyle(Qt::PenStyle style)

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

Sets the widget to use for the horizontal header to header.

Calls C++ function: void QTableView::setHorizontalHeader(QHeaderView* header).

C++ documentation:

Sets the widget to use for the horizontal header to header.

See also horizontalHeader() and setVerticalHeader().

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

Reimplemented from QAbstractItemView::setModel().

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

C++ documentation:

Reimplemented from QAbstractItemView::setModel().

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

Reimplemented from QAbstractItemView::setRootIndex().

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

C++ documentation:

Reimplemented from QAbstractItemView::setRootIndex().

pub unsafe fn set_row_height(&self, row: c_int, height: c_int)[src]

Sets the height of the given row to be height.

Calls C++ function: void QTableView::setRowHeight(int row, int height).

C++ documentation:

Sets the height of the given row to be height.

This function was introduced in Qt 4.1.

See also rowHeight().

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

If hide is true row will be hidden, otherwise it will be shown.

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

C++ documentation:

If hide is true row will be hidden, otherwise it will be shown.

See also isRowHidden() and setColumnHidden().

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

Reimplemented from QAbstractItemView::setSelectionModel().

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

C++ documentation:

Reimplemented from QAbstractItemView::setSelectionModel().

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

This property holds whether the grid is shown

Calls C++ function: [slot] void QTableView::setShowGrid(bool show).

C++ documentation:

This property holds whether the grid is shown

If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.

Access functions:

bool showGrid() const
void setShowGrid(bool show)

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

If enable is true, enables sorting for the table and immediately trigger a call to sortByColumn() with the current sort section and order

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

C++ documentation:

If enable is true, enables sorting for the table and immediately trigger a call to sortByColumn() with the current sort section and order

Note: Setter function for property sortingEnabled.

See also isSortingEnabled().

pub unsafe fn set_span(
    &self,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int
)
[src]

Sets the span of the table element at (row, column) to the number of rows and columns specified by (rowSpanCount, columnSpanCount).

Calls C++ function: void QTableView::setSpan(int row, int column, int rowSpan, int columnSpan).

C++ documentation:

Sets the span of the table element at (row, column) to the number of rows and columns specified by (rowSpanCount, columnSpanCount).

This function was introduced in Qt 4.2.

See also rowSpan() and columnSpan().

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

Sets the widget to use for the vertical header to header.

Calls C++ function: void QTableView::setVerticalHeader(QHeaderView* header).

C++ documentation:

Sets the widget to use for the vertical header to header.

See also verticalHeader() and setHorizontalHeader().

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

This property holds the item text word-wrapping policy

Calls C++ function: void QTableView::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 true by default.

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

This property was introduced in Qt 4.3.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

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

Show the given column.

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

C++ documentation:

Show the given column.

See also hideColumn() and showRow().

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

This property holds whether the grid is shown

Calls C++ function: bool QTableView::showGrid() const.

C++ documentation:

This property holds whether the grid is shown

If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.

Access functions:

bool showGrid() const
void setShowGrid(bool show)

pub unsafe fn show_row(&self, row: c_int)[src]

Show the given row.

Calls C++ function: [slot] void QTableView::showRow(int row).

C++ documentation:

Show the given row.

See also hideRow() and showColumn().

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

Sorts the model by the values in the given column in the given order.

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

C++ documentation:

Sorts the model by the values in the given column in the given order.

This function was introduced in Qt 4.2.

See also sortingEnabled.

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

Sorts the model by the values in the given column in the given order.

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

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

Sorts the model by the values in the given column in the given order.

This function was introduced in Qt 4.2.

See also sortingEnabled.

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

Returns the table view's vertical header.

Calls C++ function: QHeaderView* QTableView::verticalHeader() const.

C++ documentation:

Returns the table view's vertical header.

See also setVerticalHeader(), horizontalHeader(), and QAbstractItemModel::headerData().

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

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

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

This property holds the item text word-wrapping policy

Calls C++ function: bool QTableView::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 true by default.

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

This property was introduced in Qt 4.3.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

Trait Implementations

impl CppDeletable for QTableWidget[src]

unsafe fn delete(&self)[src]

Destroys this QTableWidget.

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

C++ documentation:

Destroys this QTableWidget.

impl Deref for QTableWidget[src]

type Target = QTableView

The resulting type after dereferencing.

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

Calls C++ function: QTableView* static_cast<QTableView*>(QTableWidget* ptr).

impl DynamicCast<QTableWidget> for QTableView[src]

unsafe fn dynamic_cast(ptr: Ptr<QTableView>) -> Ptr<QTableWidget>[src]

Calls C++ function: QTableWidget* dynamic_cast<QTableWidget*>(QTableView* ptr).

impl DynamicCast<QTableWidget> for QAbstractItemView[src]

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

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

impl DynamicCast<QTableWidget> for QAbstractScrollArea[src]

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

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

impl DynamicCast<QTableWidget> for QFrame[src]

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

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

impl DynamicCast<QTableWidget> for QWidget[src]

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

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

impl DynamicCast<QTableWidget> for QObject[src]

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

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

impl DynamicCast<QTableWidget> for QPaintDevice[src]

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

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

impl StaticDowncast<QTableWidget> for QTableView[src]

unsafe fn static_downcast(ptr: Ptr<QTableView>) -> Ptr<QTableWidget>[src]

Calls C++ function: QTableWidget* static_cast<QTableWidget*>(QTableView* ptr).

impl StaticDowncast<QTableWidget> for QAbstractItemView[src]

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

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

impl StaticDowncast<QTableWidget> for QAbstractScrollArea[src]

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

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

impl StaticDowncast<QTableWidget> for QFrame[src]

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

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

impl StaticDowncast<QTableWidget> for QWidget[src]

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

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

impl StaticDowncast<QTableWidget> for QObject[src]

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

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

impl StaticDowncast<QTableWidget> for QPaintDevice[src]

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

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

impl StaticUpcast<QAbstractItemView> for QTableWidget[src]

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

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

impl StaticUpcast<QAbstractScrollArea> for QTableWidget[src]

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

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

impl StaticUpcast<QFrame> for QTableWidget[src]

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

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

impl StaticUpcast<QObject> for QTableWidget[src]

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

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

impl StaticUpcast<QPaintDevice> for QTableWidget[src]

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

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

impl StaticUpcast<QTableView> for QTableWidget[src]

unsafe fn static_upcast(ptr: Ptr<QTableWidget>) -> Ptr<QTableView>[src]

Calls C++ function: QTableView* static_cast<QTableView*>(QTableWidget* ptr).

impl StaticUpcast<QWidget> for QTableWidget[src]

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

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