title: How to set a default file name and a current directory in getSaveFileName dialog at the same time?
body: <p>I read in this Qt reference <a href="http://doc.qt.io/qt-5/qfiledialog.html#getSaveFileName" rel="nofollow noreferrer">http://doc.qt.io/qt-5/qfiledialog.html#getSaveFileName</a> about <code>getSaveFileName()</code> function in <strong>qFileDialog</strong>. In the third parameter <code>const QString &amp; dir = QString()</code>, I can provide with a current directory or a default file name, but I don't know how to provide both <strong>currentPath</strong> and <strong>ui->titleEdit->text().trimmed()</strong> in <code>getSaveFileName()</code> function at the same time. </p>
  
  <pre><code>void TipManager::on_saveButton_clicked()
  {
      //save dialog
      QString fileName = QFileDialog::getSaveFileName(this,
              tr("Save Tip Code"), currentPath /*ui-&gt;titleEdit-&gt;text().trimmed()*/,
              tr("Tip Code (*.txt);;All Files (*)"));
      saveFile(fileName);
  }
  </code></pre>
  
  <p><strong>currentPath</strong> is a current directory and <strong>ui->titleEdit->text().trimmed()</strong> is a default file name when I open a save dialog box.
  How could I solve this?</p>
  
  <p>@edit (solved)</p>
  
  <p>I solved this question with a help of @thuga :</p>
  
  <pre><code>void TipManager::on_saveButton_clicked()
  {
      //save dialog
      QString fileName = QFileDialog::getSaveFileName(this,
              tr("Save Tip Code"), currentPath +"/"+ ui-&gt;titleEdit-&gt;text().trimmed(),
              tr("Tip Code (*.txt);;All Files (*)"));
      saveFile(fileName);
  }
  </code></pre>
  
  <p>I combined two <strong>QString</strong> variables with <strong>+</strong> and it seems that it is separated by <strong>/</strong>, so I put it in between two variables.</p>