Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.0.0, 5.6.1
-
None
-
Windows 7, Visual Studio 2015
Description
#include <QtCore/QDebug> #include <QtCore/QFileInfo> #include <QtWidgets/QApplication> #include <QtWidgets/QFileSystemModel> int main(int argc, char *argv[]) { QApplication a(argc, argv); // Before running, execute "cd C:\Windows" at the command prompt QFileSystemModel fileSystemModel; auto index = fileSystemModel.index("C:/"); qDebug() << fileSystemModel.filePath(index) << fileSystemModel.fileInfo(index).absoluteFilePath() << QFileInfo("C:/").absoluteFilePath(); // Output: // "C:/" "C:/Windows" "C:/" // Expected: // "C:/" "C:/" "C:/" }