Subclass QItemDelegate and override createEditor() so that it always installs your event filter on the created editor widget:
{
editor->installEventFilter(eventFilter);
return editor;
}
QWidget* MyItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QWidget* editor = QItemDelegate::createEditor(parent, option, index);
editor->installEventFilter(eventFilter);
return editor;
}
To copy to clipboard, switch view to plain text mode
and use this item delegate for your list widget..
Bookmarks