title: Set consistent mouse cursor for QWidget
body: <p>I have sub-classed QWidget to draw on it using mouse.
  I use setCursor to change its cursor to cross shape. 
  It is working fine but as soon as I press the mouse button on it (for example to draw freehand line), the cursor changes back to application cursor.
  Note that I do not want to use setOverrideCursor on mouseenter event for example because I want to change cursor only for this widget and not for entire application, and I have a better workaround (as follows) anyways.</p>
  
  <p>My current solution is to use 
  setCursor(cursor());
  in my overridden mousePressEvent(QMouseEvent * event) and mouseDoubleClickEvent(QMouseEvent * event)
  The latter is because for some reason double click also changes the cursor to the application cursor for a moment!
  The workaround works :) but I would like to see if there is any better solution, that asks QT not to change the cursor at all.</p>
  
  <p>I should add that drag/drop is not activated.</p>
  
  <p>Here is some source code snippet as requested:</p>
  
  <pre><code>class MyWidget : public QWidget
  {
      void paintEvent( QPaintEvent * /*event*/ );
      void resizeEvent( QResizeEvent * event );
      void mouseDoubleClickEvent ( QMouseEvent * event );
      void mousePressEvent( QMouseEvent* event );
      void mouseReleaseEvent( QMouseEvent* event );
      void mouseMoveEvent( QMouseEvent* event );
      void wheelEvent( QWheelEvent* event );
  }
  </code></pre>
  
  <p>Then I override the following (for the workaround)</p>
  
  <pre><code>void MyWidget::mouseDoubleClickEvent(QMouseEvent * event)
  {
      // ... do some other stuff ...
      // This is a workaround to prevent the cursor from changing
      setCursor(cursor());
      event-&gt;accept();
  }
  void MyWidget::mousePressEvent(QMouseEvent * event)
  {
      // ... do some other stuff ...
      // This is a workaround to prevent the cursor from changing
      setCursor(cursor());
      event-&gt;accept();
  }
  </code></pre>
  
  <p>To change cursor assuming that <code>mywidget</code> is instantiated with my class, I do this: <code>mywidget-&gt;setCursor(Qt::CrossCursor)</code>
  Again, it changes the cursor as expected when I hover over my control, but it changes back to the application cursor once I press the mouse button (thus the need for the above workaround)</p>