title: How to concatenate an absolute path and relative path with QDir?
body: <p>I have a relative path and absolute path that look something like this:</p>
  
  <pre>
  Absolute: /tmp/somedir
  Relative: anotherdir/file.txt
  </pre>
  
  <p>I would like to concatenate the two (<code>/tmp/somedir/anotherdir/file.txt</code>) with <a href="https://doc.qt.io/qt-5/qdir.html" rel="noreferrer">QDir</a> but I am not quite sure what the proper way of doing that is.</p>
  
  <p>According to the documentation for <a href="https://doc.qt.io/qt-5/qdir.html#absoluteFilePath" rel="noreferrer"><code>QDir::absoluteFilePath</code></a>:</p>
  
  <blockquote>
    <p>"Returns the absolute path name of a file in the directory."</p>
  </blockquote>
  
  <p>This would be ideal if all I had was a filename, but I have a relative path as well. I looked at some of the other functions on the page, but none of them seemed to be what I was looking for.</p>
  
  <p>What function should I be using?</p>