Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41025

Localized directory names for QFileSystemModel class.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.8.6, 5.3.1
    • Core: Item Models
    • Platform: Windows
      Deliverable: Qt Framework
      Version: 5.3.1
      OS version: Windows 7
      Compiler: MSVC 2013

    Description

      The content of the QFileSystemModel in a QTreeView are different between the test program and the Windows Explorer on a German localized Windows 7 system.

      The path "C:\Users" should be represented as "C:\Benutzer", exactly reflecting the localized directory names in Windows Explorer.

      #include <QApplication>
      #include <QFileSystemModel>
      #include <QTreeView>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QFileSystemModel *model = new QFileSystemModel;
          model->setRootPath(QDir::currentPath());
          QTreeView *tree = new QTreeView();
          tree->setModel(model);
          tree->show();
      
          return a.exec();
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dfaure_kdab David Faure
            leonlee Leonard Lee
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes