Skip to content

Commit 7013f6e

Browse files
committed
Make sure style sample column is not editable directly.
1 parent cf96194 commit 7013f6e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/gui/FontList.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ void FontItemDelegate::initStyleOption(QStyleOptionViewItem *opt, const QModelIn
5353
opt->textElideMode = Qt::ElideNone;
5454
}
5555

56+
QWidget *FontItemDelegate::createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const
57+
{
58+
return nullptr;
59+
}
60+
5661
QSize FontItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &idx) const
5762
{
5863
QStyleOptionViewItem opt = option;

src/gui/FontList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class FontItemDelegate : public QStyledItemDelegate
2525

2626
protected:
2727
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
28+
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
2829

2930
private:
3031
int _fontSize;

0 commit comments

Comments
 (0)