MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / dropEvent

Method dropEvent

ElaWidgetTools/ElaTabWidget.cpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 if (index >= 0)
73 {
74 QHoverEvent leave(QEvent::HoverLeave, QPointF(), QPointF());
75 QApplication::sendEvent(bar, &leave);
76 setCurrentIndex(getIndex(index));
77 Q_EMIT tabContextMenuRequested(getIndex(index), bar->mapToGlobal(position));
78 }
79 });
80 connect(bar, &ElaTabBar::tabDragRequested, d, [d, getIndex](int index) {
81 d->startTabDrag(getIndex(index));
82 });
83 connect(bar, &ElaTabBar::tabDropRequested, this, [this, d, bar, getIndex](const QMimeData* data, int index, Qt::DropAction action) {
84 auto* source = getDragSource(data);
85 if (source && (source == this || (getDragScope() && source->getDragScope() == getDragScope())))
86 {
87 transferTab(source, getDragPage(data), getIndex(index), bar == d->_pinnedTabBar, action);
88 }

Callers

nothing calls this directly

Calls 1

onTabDragDropMethod · 0.80

Tested by

no test coverage detected