table_view ========== .. py:module:: qfluentwidgets.components.widgets.table_view Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.table_view.TableItemDelegate qfluentwidgets.components.widgets.table_view.TableBase qfluentwidgets.components.widgets.table_view.TableWidget qfluentwidgets.components.widgets.table_view.TableView .. py:class:: TableItemDelegate(parent: PyQt5.QtWidgets.QTableView) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` .. py:attribute:: margin :value: 2 .. py:attribute:: hoverRow .. py:attribute:: pressedRow .. py:attribute:: selectedRows .. py:method:: setHoverRow(row: int) .. py:method:: setPressedRow(row: int) .. py:method:: setSelectedRows(indexes: List[PyQt5.QtCore.QModelIndex]) .. py:method:: sizeHint(option, index) .. py:method:: createEditor(parent: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) -> PyQt5.QtWidgets.QWidget .. py:method:: updateEditorGeometry(editor: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:method:: initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:method:: paint(painter, option, index) .. py:class:: TableBase(*args, **kwargs) Table base class .. py:attribute:: delegate .. py:attribute:: scrollDelagate .. py:method:: setBorderVisible(isVisible: bool) set the visibility of border .. py:method:: setBorderRadius(radius: int) set the radius of border .. py:method:: leaveEvent(e) .. py:method:: resizeEvent(e) .. py:method:: keyPressEvent(e: PyQt5.QtGui.QKeyEvent) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: setItemDelegate(delegate: TableItemDelegate) .. py:method:: selectAll() .. py:method:: selectRow(row: int) .. py:method:: clearSelection() .. py:method:: setCurrentIndex(index: PyQt5.QtCore.QModelIndex) .. py:method:: updateSelectedRows() .. py:class:: TableWidget(parent=None) Bases: :py:obj:`TableBase`, :py:obj:`PyQt5.QtWidgets.QTableWidget` Table widget .. py:method:: setCurrentCell(row: int, column: int, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: setCurrentItem(item: PyQt5.QtWidgets.QTableWidgetItem, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow .. py:class:: TableView(parent=None) Bases: :py:obj:`TableBase`, :py:obj:`PyQt5.QtWidgets.QTableView` Table view .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow