winsoft666 / QCefWidget

A Qt widget that can render and interact with webpage.
GNU Lesser General Public License v3.0
263 stars 62 forks source link

Mouse tracking is not working inside cefwidget instance #43

Closed radiaku closed 3 months ago

radiaku commented 1 year ago

Hello, I want tracking mouse movement, but its failed. I use https://github.com/winsoft666/QCefWidget/tree/v1.0.2 ( for vs2017 reason )

cefwnd.cpp

pCefGLWidget_->setMouseTracking(true);
...

void CefWnd::mouseMoveEvent(QMouseEvent* event) {
  qDebug() << event->pos();
}

cefwnd.h

void mouseMoveEvent(QMouseEvent* event) override;

qcefwidget.h

void mouseMoveEvent(QMouseEvent* event) override;

qcefwidget.cpp

void QCefWidget::mouseMoveEvent(QMouseEvent* event) {
  Q_ASSERT(pImpl_);
  emit QWidget::mouseMoveEvent(event);
}

How to accomplished this one?