title: How to use QlineEdit to enter integer values
body: <p>I am trying to use <code>QlineEdit</code>.</p>
  
  <p>How would I enter a value into the edit bar when I run the program and get that valued stored as a variable to be used later. So far I have only found out how to enter text using </p>
  
  <pre class="lang-cpp prettyprint-override"><code>void parameter_settings::on_lineEdit_textEdited(const QString &amp;arg1)
  
  {
      ui-&gt;lineEdit-&gt;setText("");
  }
  </code></pre>
  
  <p>I have a GUI that requires the user to enter a value within a specific range. That value would be stored as a variable for later use. I have read about validators but can't get it to work as intended. </p>