title: Qt creator C++, void value is not ignored as it ought to be
body: <pre><code>QList&lt;QPoint*&gt; DrawingWidget::getCloseLinesById(int m_x, int m_y) {
      QList&lt;QPoint*&gt; lines;
      // HERE I APPEND ABOUT 5 ITEMS 
  
      return lines;
  }
  </code></pre>
  
  <p>The appending works here. It only gives me a few warnings, but it still compiles. The warning is.</p>
  
  <pre><code>taking address of temporary
  </code></pre>
  
  <p>But this </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();
              QList&lt;QPoint*&gt; points = getCloseLinesById(event-&gt;x(), event-&gt;y());
              for(int i = 0; i &lt; points.size(); i++) {
                  *points[i]-&gt;setX(event-&gt;x()); //error on this line
                  *points[i]-&gt;setY(event-&gt;y()); // error on this line
              }
              update();
          }
      }
  }
  </code></pre>
  
  <p>result in these errors:</p>
  
  <pre><code>void value not ignored as it ought to be
  void value not ignored as it ought to be
  </code></pre>
  
  <p>So it gives the same error for both lines.</p>
  
  <p>This code should basically move my lines when I move my mouse.</p>
  
  <p>How can I fix this problem?</p>