title: Qt Creator, C++, mouse over function
body: <p>I want to change the color of an ellipse when I move my mouse over it.
  But I haven't found anything from reference and auto-complete from Qt Creator.</p>
  
  <p>Do you guys know how to do it?</p>
  
  <p>Some of my code:</p>
  
  <pre><code>void DrawingWidget::paintEvent(QPaintEvent *event) {
      QPainter painter(this);
      painter.fillRect(event-&gt;rect(), Qt::white);
  
      for(int i = 0; i &lt; pointList.size(); i++) {
          if (pointList[i].x() &gt;= 0 &amp;&amp; pointList[i].y() &gt;= 0)
              painter.drawEllipse(pointList[i], 10, 10);
      }
      painter.drawLines(lineList);
      m_mainWindow-&gt;updateCount();
  }
  </code></pre>
  
  <p>Mouse press event handler:</p>
  
  <pre><code>void DrawingWidget::mousePressEvent(QMouseEvent *event) {
      if (event-&gt;button() == Qt::LeftButton
          &amp;&amp; event-&gt;buttons() == Qt::LeftButton) {
          // DO STUFFF
      }
  }
  </code></pre>
  
  <p>Mouse move event handler:</p>
  
  <pre><code>void DrawingWidget::mouseMoveEvent(QMouseEvent *event) {
      if (m_mainWindow-&gt;getSelectedTool() == MainWindow::moveVertexTool) {
          m_x = event-&gt;x();
          m_y = event-&gt;y();
          if (isPointNear(m_x, m_y)) {
              //STUFF
          }
              update();
          }
      }
  }
  </code></pre>
  
  <p>Now I just need a mouse <strong>OVER</strong> event (handler).</p>