class pydm.widgets.nt_table.PythonTableModel(column_names, initial_list=None, parent=None, edit_method=None, can_edit_method=None)[source]

Bases: QAbstractTableModel

columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
flags(self, index: QModelIndex) Qt.ItemFlags[source]
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
setData(self, index: QModelIndex, value: Any, role: int = Qt.ItemDataRole.EditRole) bool[source]
sort(self, column: int, order: Qt.SortOrder = Qt.AscendingOrder)[source]
class pydm.widgets.nt_table.PyDMNTTable(parent=None, init_channel=None)[source]

Bases: QWidget, PyDMWritableWidget

The PyDMNTTable is a table widget used to display PVA NTTable data.

The PyDMNTTable has two ways of filling the table from the data. If the incoming data dictionary has a ‘labels’ and/or a ‘value’ key. Then the list of labels will be set with the data from the ‘labels’ key. While the data from the ‘value’ key will be used to set the values in the table. if neither ‘labels’ or ‘value’ key are present in the incoming ‘data’ dictionary, then the keys of the data dictionary are set as the labels and all the values stored by the keys will make up the values of the table.

  • parent (QWidget, optional) – The parent widget for the PyDMNTTable

  • init_channel (str, optional) – The channel to be used by the widget.


Checks whether or not the widget should be disable.

send_table(row, column, value)[source]

Update Channel value when cell value is changed.

  • row (int) – index of row

  • column (int) – index of column

  • value (str) – new value of cell


Callback invoked when the Channel value is changed.


data (dict) – The new value from the channel.