| 63 | } |
| 64 | else |
| 65 | { |
| 66 | Q_EMIT tabCloseRequested(getIndex(index)); |
| 67 | } |
| 68 | }); |
| 69 | bar->setContextMenuPolicy(Qt::CustomContextMenu); |
| 70 | connect(bar, &QWidget::customContextMenuRequested, this, [this, bar, getIndex](const QPoint& position) { |
| 71 | const int index = bar->tabAt(position); |
| 72 | if (index >= 0) |
| 73 | { |
| 74 | QHoverEvent leave(QEvent::HoverLeave, QPointF(), QPointF()); |
| 75 | QApplication::sendEvent(bar, &leave); |
nothing calls this directly
no outgoing calls
no test coverage detected