I realise drag&drop actions on QTableView. My reimplemented mouseMoveEvent() looks so:
Qt Code:
void MyClass::mouseMoveEvent(QMouseMove* event) { qDebug() << event->button(); if (event->button() == Qt::LeftButton) { int distance = (event->pos() - fPressPos).manhattanLength(); startDrag(); } } }To copy to clipboard, switch view to plain text mode
I execute my application and tried to move mouse with pressed left button above my widget. In debug messages I see 0. And function did not enter first condition. So move event called, but QMouseEvent not contains information about buttons pressed. I have not idea why it happening.
Bookmarks