title: Get the path from a QML url
body: <p><code>FileDialog</code> gives a QML <code>url</code> variable. <code>theurl.toString()</code> gives something like <code>file:///c:\foo\bar.txt</code>. How do I get <code>c:\foo\bar.txt</code>?</p>
  
  <p>I want to do it in a cross-platform way, and ideally without relying on regex-style hacks. <code>QUrl</code> provides a <code>path()</code> method, but I don't seem to be able to access it from QML.</p>