Class: QgsTableEditorDialog

class qgis.gui.QgsTableEditorDialog(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QMainWindow

Constructor for QgsTableEditorDialog with the specified parent widget.

A reusable window for editing simple spreadsheet-style tables.

Table content is retrieved and set using the QgsTableContents class. The editor has support for table foreground and background colors, and numeric formats.

New in version 3.12.

Parameters

parent

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) → bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) → bool
hideEvent(self, QHideEvent)
includeHeaderChanged

Emitted whenever the “include table header” setting is changed. [signal]

Parameters

included (bool) –

includeTableHeader(self) → bool

Returns True if the table includes a header row.

Return type

bool

initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) → bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) → int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) → int
resizeEvent(self, QResizeEvent)
sender(self) → QObject
senderSignalIndex(self) → int
setIncludeTableHeader(self, included: bool)

Sets whether the table includes a header row.

Parameters

included (bool) –

setTableColumnWidth(self, column: int, width: float)

Sets the configured column width for the specified column. Set width to 0 if an automatic width should be used for the column.

This should be called after a call to setTableContents().

Parameters
  • column (int) –

  • width (float) –

setTableContents(self, contents: object)

Sets the contents to show in the editor widget.

See also

tableContents()

Parameters

contents (object) –

setTableHeaders(self, headers: Iterable[Any])

Sets the table headers.

See also

tableHeaders()

Parameters

headers (Iterable[Any]) –

setTableRowHeight(self, row: int, height: float)

Sets the configured row height for the specified row. Set height to 0 if an automatic height should be used for the row.

This should be called after a call to setTableContents().

See also

tableRowHeight()

Parameters
  • row (int) –

  • height (float) –

sharedPainter(self) → QPainter
showEvent(self, QShowEvent)
tableChanged

Emitted whenever the table contents are changed. [signal]

tableColumnWidth(self, column: int) → float

Returns the configured column width for the specified column, or 0 if an automatic width should be used for the column.

Parameters

column (int) –

Return type

float

tableContents(self) → object

Returns the current contents of the editor widget table.

Return type

object

tableHeaders(self) → List[Any]

Returns the table header values.

Return type

List[Any]

tableRowHeight(self, row: int) → float

Returns the configured row height for the specified row, or 0 if an automatic height should be used for the row.

Parameters

row (int) –

Return type

float

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)