Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Problem with mouseWheelEvent in SWF, loaded to QWebView
Forum Updated to NodeBB v4.3 + New Features

Problem with mouseWheelEvent in SWF, loaded to QWebView

Scheduled Pinned Locked Moved Solved Qt WebKit
5 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vmkan
    wrote on last edited by
    #1

    Greetings!

    have a program, written in C++, using Qt 5.5.1 (can't switch to another version), running under Windows (7 or 10, doesn't matter).

    So I have some FlashWidget, subclassed from QWebView. It loads html file, parses it and replaces %1 with appropriate path to *.swf

    <object 
        class="flashPlayer"
        width=90%
        height=100% 
        type="application/x-shockwave-flash"
        id="bridgemovie"
        data="%1"  >
        <param name="allowScriptAccess" value="always"/>
    </object>
    

    SWF file has event listeners on mouse events: mouse down, up and mouse wheel

    addEventListener(MouseEvent.MOUSE_WHEEL, zoom); //"zoom" is just some internal function
    addEventListener(MouseEvent.MOUSE_DOWN, mouseDown1);
    addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
    

    Problem: Dragging and clicking works pretty well, but loaded SWF doesn't receive wheel events. I can't modify SWF code, only C++ and HTML parts. So, how I can natively pass mouseWheel event from JS (or, perhaps, QWebView, if allowed so) to the loaded SWF file?

    P.S. I've tried loading SWF with QAxWidget, and wheelEvent is received, but there are some rendering problems, so I'm trying to repair solution with QWebView.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThatDud3
      wrote on last edited by
      #2

      I was having similar problems even with live websites using flash heavily esp. some games where mouse was off by 10-12 pixels so to actually hit some flash buttons I had to deliberately click below the button (thank god they have tooltips). This was definitely Qt fault - all these worked perfectly in actual Chrome browser.

      This was fixed recently - since Qt 5.7.1 it is working properly - can you test with 5.7.1 or 5.8 to see if that issue is resolved.

      V 1 Reply Last reply
      2
      • T ThatDud3

        I was having similar problems even with live websites using flash heavily esp. some games where mouse was off by 10-12 pixels so to actually hit some flash buttons I had to deliberately click below the button (thank god they have tooltips). This was definitely Qt fault - all these worked perfectly in actual Chrome browser.

        This was fixed recently - since Qt 5.7.1 it is working properly - can you test with 5.7.1 or 5.8 to see if that issue is resolved.

        V Offline
        V Offline
        vmkan
        wrote on last edited by
        #3

        @ThatDud3 , thanks for your reply. Actually, I'm stuck to Qt version, but I'll try it with QWebEngine (because there is no WebKit in 5.7.1)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          ThatDud3
          wrote on last edited by
          #4

          Sorry I've hit the wrong thread - I really thought the problem is with WebEngine (i.e. Blink) - I meant WebEngine was having similar troubles that got fixed just recently.

          Well even if WebKit binaries are no longer distributed with newer versions of Qt you can build it from source, and if you want more recent version go here
          https://github.com/annulen/qtwebkit-snapshots

          V 1 Reply Last reply
          2
          • T ThatDud3

            Sorry I've hit the wrong thread - I really thought the problem is with WebEngine (i.e. Blink) - I meant WebEngine was having similar troubles that got fixed just recently.

            Well even if WebKit binaries are no longer distributed with newer versions of Qt you can build it from source, and if you want more recent version go here
            https://github.com/annulen/qtwebkit-snapshots

            V Offline
            V Offline
            vmkan
            wrote on last edited by
            #5

            @ThatDud3, well, it really seemes like a bug, because latest WebKit has no such problem. Thank you for help!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved