A QItemDelegate for showing model properties in a QTableView.
More...
|
| | ModelTableDelegate (DesignSortFilterProxyModel *model, QObject *parent=nullptr) |
| | Constructs a ModelTableDelegate for the given proxy model.
|
| bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override |
| | Handles editor events such as clicks on material cells.
|
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Paints a cell in the table, including custom rendering for material properties.
|
| void | setModel (DesignSortFilterProxyModel *model) |
| | Sets the proxy model used by this delegate.
|
A QItemDelegate for showing model properties in a QTableView.
Definition at line 51 of file DesignPropertyTable.h.
◆ ModelTableDelegate()
Constructs a ModelTableDelegate for the given proxy model.
- Parameters
-
| [in] | model | The sort/filter proxy model providing data. |
| [in] | parent | The parent QObject. |
◆ editorEvent()
| bool ModelTableDelegate::editorEvent |
( |
QEvent * | event, |
|
|
QAbstractItemModel * | model, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) |
|
override |
Handles editor events such as clicks on material cells.
- Parameters
-
| [in] | event | The event to process. |
| [in] | model | The abstract item model. |
| [in] | option | The style options for the item. |
| [in] | index | The model index of the item. |
- Returns
- True if the event was handled.
◆ paint()
| void ModelTableDelegate::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
Paints a cell in the table, including custom rendering for material properties.
- Parameters
-
| [in] | painter | The QPainter to use for rendering. |
| [in] | option | The style options for the item. |
| [in] | index | The model index of the item to paint. |
◆ setModel()
The documentation for this class was generated from the following file: