title: Getting filename from path using QString basic functions
body: <p>There's some path as QString:</p>
  
  <pre><code>QString path = "C:/bla/blah/x/y/file.xls";
  </code></pre>
  
  <p>I thought that maybe getting last offset of <code>/</code> would be a good start. I could then use <a href="http://doc.qt.io/qt-5/qstring.html#right" rel="noreferrer"><code>right</code></a> method (no pun intended) to get everything after that character:</p>
  
  <pre><code>path = path.right(path.lastIndexOf("/"));
  </code></pre>
  
  <p>or in a more compatible way:</p>
  
  <pre><code>path = path.right(std::max(path.lastIndexOf("\\"), path.lastIndexOf("/")));
  </code></pre>
  
  <p>Those both have the same bad result:</p>
  
  <pre><code>ah/x/y/file.xls
  </code></pre>
  
  <p>What's wrong here? Obviously the path is getting cut too soon, but it's even weirder it's not cut at any of <code>/</code> at all.</p>