When I select a drive let's say "D" and store it via filePath(QModelIndex)
this is not recognized by Windows as a D:\
but as a D:
which are two different things I've just learned. Is there a way to make a filePath
from QFileSystemModel
returns the real path (the path I'm selecting)?
Asked
Active
Viewed 290 times
0

HostileFork says dont trust SE
- 32,904
- 11
- 98
- 167

smallB
- 16,662
- 33
- 107
- 151
-
Eh, if you currently get `D:`, then that IS the drive. `D:\ ` would be the root directory of that drive, and a path. But unlike a root directory, a drive is not a path. – MSalters Dec 06 '11 at 17:15
-
@MSalters I do understand what you're saying but if I pass "D:" instead of "D:\" the result is not what I want - former gives current app path, and latter is what I really need. – smallB Dec 06 '11 at 17:50