| 305 | } |
| 306 | |
| 307 | bool ExpandingDelegate::editorEvent(QEvent* event, QAbstractItemModel* /*model*/, const QStyleOptionViewItem& /*option*/, const QModelIndex& index) |
| 308 | { |
| 309 | if (event->type() == QEvent::MouseButtonRelease) { |
| 310 | const QModelIndex sourceIndex = model()->mapToSource(index); |
| 311 | event->accept(); |
| 312 | model()->setExpanded(sourceIndex, !model()->isExpanded(sourceIndex)); |
| 313 | heightChanged(); |
| 314 | |
| 315 | return true; |
| 316 | } else { |
| 317 | event->ignore(); |
| 318 | } |
| 319 | |
| 320 | return false; |
| 321 | } |
| 322 | |
| 323 | QVector<QTextLayout::FormatRange> ExpandingDelegate::highlightingFromVariantList(const QList<QVariant>& customHighlights) const |
| 324 | { |
nothing calls this directly
no test coverage detected