title: QRegExp: No such file or direcory
body: <p>I dont understand why Im getting the following error:</p>
  <blockquote>
  <p>C:\Users\jacqu\Desktop\SMG-DS\SMG-DS\orderform.cpp:8: error: QRegExp: No such file or directory
  ..\SMG-DS\orderform.cpp:8:10: fatal error: QRegExp: No such file or directory
  8 | #include &quot;QRegExp&quot;
  |          ^~~~~~~~~</p>
  </blockquote>
  <p>I keep getting this even though i include RegExp as follows:
  <code>#include &lt;QRegExp&gt;</code>
  or as <code>#include &quot;QRegExp&quot;</code></p>
  <p>this is the code where i use it:</p>
  <pre><code>bool orderform::nv(QString num) //Validates phone numbers
  {
      QRegExp nv(&quot;^\\+?(1 |)[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}$&quot;);
      nv.setPatternSyntax(QRegExp::RegExp);
      bool regMat = nv.exactMatch(num);
      if(regMat == false)
      {
      QMessageBox *message = new QMessageBox(this);
      message-&gt;setWindowModality(Qt::NonModal);
      message-&gt;setText(&quot;Please insert a valid phone number&quot;);
      message-&gt;setStandardButtons(QMessageBox::Ok);
      message-&gt;setWindowTitle(&quot;ERROR&quot;);
      message-&gt;setIcon(QMessageBox::Information);
      message-&gt;exec();
      ui-&gt;edtCustPhone-&gt;setFocus();
      ui-&gt;edtCustPhone-&gt;selectAll();
      return false;
      }else{
      return true;
      }
  };
  </code></pre>