[Solved] QT 4.8 Pass mousemove events to QGraphicsWebView in Default HTML 5 Application
-
I am creating an html 5 application that requires tracking of the mouse even if the mouse buttons are not pressed down. I have done quite of bit of searching and found setMouseTracking. Nothing I have tried has worked. This is what I have tried, with no luck.
in main.cpp
@
viewer.setMouseTracking(true);
@in html5applicationviewer inside Html5ApplicationViewerPrivate::Html5ApplicationViewerPrivate(QWidget *parent)
@parent->setMouseTracking(true);@I find it hard to believe that it's more complicated than just setting a flag somewhere. Please help! I have not changed anything else, so it should be the same as a freshly generated HTML 5 application project
-
Hi!
Take a look at "mouseMoveEvent":http://doc.qt.digia.com/qt/qgraphicswebview.html#mouseMoveEvent
Reimplement it, if you need to create any actions on mouse move.
-
It does that automatically.
So you shouldn't have any problems.I made a quick sample "here":http://wikisend.com/download/358834/JS_onMouseMove.zip
EDIT:
I see your problem after creating HTML5 app. I used default Qt Application.