title: Saving the content of a QLineEdit object into a string variable (C++)
body: <p>I've looked around the Qt Documentation, but within my project, I'd like to having most of the non-graphical 'more thinking' part of my program be on a seperate .cpp file.
  Given that, I was wanting to take the text typed into a QLineEdit object and save it as a string after the user triggers the 'returnPressed' action, but when I type:</p>
  
  <pre><code>void MainWindow::on_lineEdit_returnPressed()
  
  {
      QMessageBox msgBox;
      msgBox.setText("The entry has been modified.");
      msgBox.exec();
      //The line which should save the contents of the QLineEdit box:
      string input = QLineEdit::text();
  }
  </code></pre>
  
  <p>...Into the template provided by the Qt Creator IDE (with all necessary slots hopefully created) The compiler returns </p>
  
  <pre><code>In member function 'void MainWindow::on_lineEdit_returnPressed()'
  cannot call member function 'QString...'
  </code></pre>
  
  <p>... and so on.</p>
  
  <p>How should I rewrite my code to do this correctly?</p>