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. [Solved] QT 4.8 Pass mousemove events to QGraphicsWebView in Default HTML 5 Application
QtWS25 Last Chance

[Solved] QT 4.8 Pass mousemove events to QGraphicsWebView in Default HTML 5 Application

Scheduled Pinned Locked Moved Qt WebKit
6 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    mrkmg
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jake007
      wrote on last edited by
      #2

      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.


      Code is poetry

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrkmg
        wrote on last edited by
        #3

        I did look at that. Could you point me in the right direction on how to get that event information to pass down to the javascript event "onmousemove"?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jake007
          wrote on last edited by
          #4

          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.


          Code is poetry

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jake007
            wrote on last edited by
            #5

            Found the solution.

            @m_webView->setAcceptHoverEvents(true);@


            Code is poetry

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mrkmg
              wrote on last edited by
              #6

              Thank you Thank you Thank you!!!!

              You are a gentlemen and a scholar. m_webView->setAcceptHoverEvents(true); was it

              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