Delegate class for table and tree-like widgets implementing an in-cell combobox.
More...
|
def | __init__ (self, editable=False, data_role=QtCore.Qt.UserRole+1, parent=None) |
| Constructor. More...
|
|
QtWidgets.QWidget | createEditor (self, QtWidgets.QWidget parent, QtWidgets.QStyleOptionViewItem option, QtCore.QModelIndex index) |
| Overridden method of QtWidgets.QStyledItemDelegate: creates the underlying delegate (editor widget). More...
|
|
def | setEditorData (self, editor, QtCore.QModelIndex index) |
| Overridden method of QtWidgets.QStyledItemDelegate: updates the editor data (text) from the underlying model. More...
|
|
def | setModelData (self, editor, QtCore.QAbstractItemModel model, QtCore.QModelIndex index) |
| Overridden method of QtWidgets.QStyledItemDelegate: updates the underlying model from the editor data (text). More...
|
|
def | updateEditorGeometry (self, editor, QtWidgets.QStyleOptionViewItem option, QtCore.QModelIndex index) |
| Overridden method of QtWidgets.QStyledItemDelegate: updates the editor position and size for a given model index. More...
|
|
Delegate class for table and tree-like widgets implementing an in-cell combobox.
◆ __init__()
def pycross.forms.ComboboxDelegate.__init__ |
( |
|
self, |
|
|
|
editable = False , |
|
|
|
data_role = QtCore.Qt.UserRole + 1 , |
|
|
|
parent = None |
|
) |
| |
Constructor.
- Parameters
-
model_indices | list list of indices in underlying model that must contain the BrowseEdit fields |
thisparent | QtWidgets.QWidget parent widget for this instance |
browse_edit_kwargs | keyword arguments keyword arguments passed to BrowseEdit constructor |
◆ createEditor()
QtWidgets.QWidget pycross.forms.ComboboxDelegate.createEditor |
( |
|
self, |
|
|
QtWidgets.QWidget |
parent, |
|
|
QtWidgets.QStyleOptionViewItem |
option, |
|
|
QtCore.QModelIndex |
index |
|
) |
| |
Overridden method of QtWidgets.QStyledItemDelegate: creates the underlying delegate (editor widget).
◆ setEditorData()
def pycross.forms.ComboboxDelegate.setEditorData |
( |
|
self, |
|
|
|
editor, |
|
|
QtCore.QModelIndex |
index |
|
) |
| |
Overridden method of QtWidgets.QStyledItemDelegate: updates the editor data (text) from the underlying model.
◆ setModelData()
def pycross.forms.ComboboxDelegate.setModelData |
( |
|
self, |
|
|
|
editor, |
|
|
QtCore.QAbstractItemModel |
model, |
|
|
QtCore.QModelIndex |
index |
|
) |
| |
Overridden method of QtWidgets.QStyledItemDelegate: updates the underlying model from the editor data (text).
◆ updateEditorGeometry()
def pycross.forms.ComboboxDelegate.updateEditorGeometry |
( |
|
self, |
|
|
|
editor, |
|
|
QtWidgets.QStyleOptionViewItem |
option, |
|
|
QtCore.QModelIndex |
index |
|
) |
| |
Overridden method of QtWidgets.QStyledItemDelegate: updates the editor position and size for a given model index.
◆ data_role
pycross.forms.ComboboxDelegate.data_role |
◆ editable
pycross.forms.ComboboxDelegate.editable |
The documentation for this class was generated from the following file: