title: Qt Mouse Cursor reset
body: <p>i have item delegate that when the mouse event is over icon i change its Cursor to Qt::PointingHandCursor
  when its off i set it back to Qt::ArrowCursor . its working fine .<br>
  the problem is that besides when it over the icon . it allways stack on Qt::ArrowCursor
  even in situation when the icon needs to changes natively like when resizing the windows or when over native push button . it always Qt::ArrowCursor.<br>
  how can i force the Cursor act normally when its is no over the icon?<br>
  here is what i do :</p>
  
  <pre><code>bool MiniItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
                                           const QStyleOptionViewItem &amp;option,
                                           const QModelIndex &amp;index)
      {
          // Emit a signal when the icon is clicked
          QMouseEvent *mouseEvent = static_cast&lt;QMouseEvent*&gt;(event);
          if(!index.parent().isValid() &amp;&amp;
                  event-&gt;type() == QEvent::MouseMove) 
          {
  
               QSize  iconsize = m_iconAdd.actualSize(option.decorationSize); 
               QRect closeButtonRect =  m_iconAdd.pixmap(iconsize.width(),iconsize.height()).
                                                          rect().translated(AddIconPos(option));
  
               QSize iconRemoveSize = m_iconRemove.actualSize(option.decorationSize);
               QRect iconRemoveRect =  m_iconRemove.pixmap(iconRemoveSize.width(),iconRemoveSize.height()).
                                                                  rect().translated(RemoveIconPos(option));
  
               if(closeButtonRect.contains(mouseEvent-&gt;pos()))
               {                
                  QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor)); 
               }
               else if(iconRemoveRect.contains(mouseEvent-&gt;pos()))
               {
                  QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor)); 
               }
               else
               {
                   Qt::CursorShape shape = Qt::ArrowCursor;
                   QApplication::setOverrideCursor(QCursor(shape)); 
               }
          }
  
          if(!index.parent().isValid() &amp;&amp;
                  event-&gt;type() == QEvent::MouseButtonRelease) 
          {
  
  
               QSize  iconsize = m_iconAdd.actualSize(option.decorationSize); 
               QRect closeButtonRect =  m_iconAdd.pixmap(iconsize.width(),iconsize.height()).
                                                          rect().translated(AddIconPos(option));
  
               QSize iconRemoveSize = m_iconRemove.actualSize(option.decorationSize);
               QRect iconRemoveRect =  m_iconRemove.pixmap(iconRemoveSize.width(),iconRemoveSize.height()).
                                                                  rect().translated(RemoveIconPos(option));
  
               if(closeButtonRect.contains(mouseEvent-&gt;pos()))
               {
                 ; 
               }
               else if(iconRemoveRect.contains(mouseEvent-&gt;pos()))
               {
                  ; 
               }
          }
  
          return false;
      }
  </code></pre>