Results 1 to 3 of 3

Thread: QWebView with SWF and QEvent::MouseButtonPress

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QWebView with SWF and QEvent::MouseButtonPress

    Hello,

    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;
    }

    ....
    ui->webView->installEventFilter(this);

    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,
    Martin

  2. #2
    Join Date
    Jul 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView with SWF and QEvent::MouseButtonPress

    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.

    Martin

  3. #3
    Join Date
    Jul 2010
    Posts
    15
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView with SWF and QEvent::MouseButtonPress

    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?

Similar Threads

  1. why QListWidget can't get QEvent::MouseButtonPress?
    By to_guliang in forum Qt Programming
    Replies: 6
    Last Post: 13th May 2009, 09:50
  2. QEvent problem
    By batileon in forum Qt Programming
    Replies: 3
    Last Post: 4th May 2009, 12:23
  3. Replies: 2
    Last Post: 10th April 2009, 02:06
  4. qevent problem
    By amulya in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2006, 11:51
  5. QEvent::Enter
    By incapacitant in forum Newbie
    Replies: 6
    Last Post: 22nd March 2006, 08:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.