title: QT QWebView change mouse position
body: <p>Im making a co-browsing app for learning purposes, using a QWebView to simulate the other users screen.</p>
  
  <p>The problem Im currently having is that I receive mouse movements from the server very fast and that causes the mouse to seem "sluggish".</p>
  
  <p>My current method is to load <code>jQuery</code> into the webview and then insert a div which will act as the other users mouse. I then move that div according to the coordinates i receive - but this is really laggy.</p>
  
  <p>Here is my current code to do just that:</p>
  
  <pre><code>    // Create the div when the view loads.
      ui-&gt;webView-&gt;page()-&gt;mainFrame()-&gt;evaluateJavaScript("$(document).ready(function() {$('html').append(\'&lt;div id=\"clientCursor\" style=\"background-image:url(https://ssl.url.com/assets/cursor.png); position: absolute; z-index: 1; height: 22px; width: 22px; top: 1px\"&gt;&lt;/div&gt;\'); });");
  
      // And the moving part:
      void browsing::recieveMouseMovement(QString x, QString y) {
          ui-&gt;webView-&gt;page()-&gt;mainFrame()-&gt;evaluateJavaScript("$(\'#clientCursor\').css({\'left\': " + x + ", \'top\': " + y + "});");
      }
  </code></pre>
  
  <p>I also tried :</p>
  
  <p><code>ui-&gt;webView-&gt;cursor().setPos(x, y);</code></p>
  
  <p>But that seems to move my own desktop mouse..</p>
  
  <p>Any ideas if there is a more optimal way of simulating a moving mouse?</p>