mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
29 lines
893 B
C++
29 lines
893 B
C++
#ifndef LINEEDITDELEGATE_H
|
|
#define LINEEDITDELEGATE_H
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
|
|
class LineEditDelegate : public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LineEditDelegate(QObject *p_parent = nullptr);
|
|
|
|
QWidget *createEditor(QWidget *p_parent,
|
|
const QStyleOptionViewItem &p_option,
|
|
const QModelIndex &p_index) const Q_DECL_OVERRIDE;
|
|
|
|
void setEditorData(QWidget *p_editor, const QModelIndex &p_index) const Q_DECL_OVERRIDE;
|
|
|
|
void setModelData(QWidget *p_editor,
|
|
QAbstractItemModel *p_model,
|
|
const QModelIndex &p_index) const Q_DECL_OVERRIDE;
|
|
|
|
void updateEditorGeometry(QWidget *p_editor,
|
|
const QStyleOptionViewItem &p_option,
|
|
const QModelIndex &p_index) const Q_DECL_OVERRIDE;
|
|
};
|
|
|
|
#endif // LINEEDITDELEGATE_H
|