#include <dynamicelementtextmodel.h>
Inherits QStyledItemDelegate.
|
| | DynamicTextItemDelegate (QObject *parent=Q_NULLPTR) |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
|
| bool | eventFilter (QObject *object, QEvent *event) override |
|
| QStringList | availableInfo (DynamicElementTextItem *deti) const |
| | DynamicTextItemDelegate::availableInfo.
|
| void | commitAndCloseDeferred (QWidget *editor) const |
| | commitAndCloseDeferred Schedule commitData()/closeEditor() for editor on the next event loop iteration. For editors resolved synchronously inside createEditor() (font/color, both run their picker dialog before returning) there is no user interaction left to drive the base QStyledItemDelegate::eventFilter()'s usual Enter/focus-out commit path, so without this the value sits picked-but-uncommitted until something unrelated (e.g. clicking elsewhere) happens to trigger it. Deferred rather than called immediately: the view only registers the widget createEditor() returns as "the active
editor" after createEditor() itself returns, so emitting here would target an editor the view doesn't know about yet.
|
◆ DynamicTextItemDelegate()
| DynamicTextItemDelegate::DynamicTextItemDelegate |
( |
QObject * | parent = Q_NULLPTR | ) |
|
◆ availableInfo()
◆ commitAndCloseDeferred()
| void DynamicTextItemDelegate::commitAndCloseDeferred |
( |
QWidget * | editor | ) |
const |
|
private |
commitAndCloseDeferred Schedule commitData()/closeEditor() for editor on the next event loop iteration. For editors resolved synchronously inside createEditor() (font/color, both run their picker dialog before returning) there is no user interaction left to drive the base QStyledItemDelegate::eventFilter()'s usual Enter/focus-out commit path, so without this the value sits picked-but-uncommitted until something unrelated (e.g. clicking elsewhere) happens to trigger it. Deferred rather than called immediately: the view only registers the widget createEditor() returns as "the active
editor" after createEditor() itself returns, so emitting here would target an editor the view doesn't know about yet.
◆ createEditor()
| QWidget * DynamicTextItemDelegate::createEditor |
( |
QWidget * | parent, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
◆ eventFilter()
| bool DynamicTextItemDelegate::eventFilter |
( |
QObject * | object, |
|
|
QEvent * | event ) |
|
overrideprotected |
◆ setModelData()
| void DynamicTextItemDelegate::setModelData |
( |
QWidget * | editor, |
|
|
QAbstractItemModel * | model, |
|
|
const QModelIndex & | index ) const |
|
override |
The documentation for this class was generated from the following files: