Maybe someone know how I can get relative to specific folder file path from url for example

from
"http://doc.qt.io/documents/readme.txt"
get only
documents/readme.txt
without first slash "/"

from
"/video/Qt/example.avi"
get only
video/Qt/example.avi
without first slash "/"

I get several form of url from client applications but I need from that only file path without first "/" because then I can easily doing something like

Qt Code:
  1. QFileInfo(path).lastModified();
To copy to clipboard, switch view to plain text mode 

How I can parse url for this format?

This statement

Qt Code:
  1. QFileInfo(url2.path()).filePath();
To copy to clipboard, switch view to plain text mode 

return file path but always with first slash "/", so then I need to remove it

Qt Code:
  1. path.remove(0, 1);
To copy to clipboard, switch view to plain text mode 

It is a good solution? Or maybe QUrl have some better way?

Thanks,