Abstract starting a drag
So draggables can give their opinion on when to start a drag. So we can support movable tab-bars.
This commit is contained in:
@@ -153,7 +153,7 @@ void StatePreDrag::onEntry(QEvent *)
|
||||
|
||||
bool StatePreDrag::handleMouseMove(QPoint globalPos)
|
||||
{
|
||||
if ((globalPos - q->m_pressPos).manhattanLength() > QApplication::startDragDistance()) {
|
||||
if (q->m_draggable->dragCanStart(q->m_pressPos, globalPos)) {
|
||||
Q_EMIT q->manhattanLengthMove();
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user