TableView->setMouseTracking(true);
TableView->installEventFilter (new TMMW(TableView));
Вернее ловится но раз из 100-1000!
C++ (Qt)
class TMMW : public QObject
{
Q_OBJECT
public:
TMMW(QObject *parent) : QObject(parent) {}
virtual ~TMMW() {}
virtual bool eventFilter ( QObject * watched, QEvent * event);
};
bool TMMW::eventFilter (QObject * watched, QEvent * event) {
QAbstractItemView* View = qobject_cast<QAbstractItemView*>(watched);
if(!View) {return false;}
if (event->type() == QEvent::MouseMove) {
QMessageBox msgBox;
msgBox.setText("QEvent::MouseMove");
msgBox.setIcon(QMessageBox::Information);
msgBox.exec();
}
return false;
}