View Full Version : QWebView with SWF and QEvent::MouseButtonPress

16th July 2010, 23:30

I have a strange problem. I must disable and catch the right mouse button press when the mouse moves over a swf which is embedded in a QWebView.
Under MacOSX it works fine under Windows all events are triggered EXCEPT of the QEvent::MouseButtonPress.

The code looks like this:

bool MainWindow::eventFilter(QObject *obj, QEvent *event)
if (event->type() != QEvent::MouseButtonPress) return false;
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
if (mouseEvent->button() != Qt::RightButton) return false;
else return true;


The effect is that under MacOS X if I press the right mouse button the SWF does not pop up the right menu.
Under WINDOWS it seems that the SWF is "stronger" even embedded in the QWebView. The mousebutton presses are all catched in the embedded SWF.

I do not want that. How can I avoid that the SWF is stealing, even embedded, my mouse button presses.

Or does anyone else know some alternative on how to get rid of the anoying swf menu in WebKit.

Thank you,

17th July 2010, 00:16
Know now how it works. Fixed it and it runs smoothly.
Qt is great. I think I created the hottest mixed framework of flash and QT.
Love it.


21st July 2010, 16:58
on macos i have the problem that clicks to flash-videos do not work. the videos are linked to a click-target, in windows everything works fine. in macosx (cocoa) the link ist not called.
do you have the same problem? if not, what have you done to avoid it?