Congratulations to our 2022 Qt Champions!

QFileSystemModel not showing localized directory names with Windows 7

  • Hello,

    I am wondering if it is possible to tell QFileSystemModel to show localized directory names with a german or other localized Windows 7. Just putting it into a QTreeView always shows the lower level directory name. i.e. "User" vs. "Benutzer" and "Program Files" vs. "Programme".
    Instantiating a QFileDialog and showing it yieds the same problem. Only with the static functions of QFileDialog, the native file dialog with correct translations will be shown, as stated in the documentation for QFileDialog.

    I tested it with Qt 4.6.2 and Qt 4.7, but got the same result with both versions.

    If this is not possible, I think this should be considered as a missing feature.

    kind regards

  • I aggree to you fips, I noticed the same behaviour recently. It might be very confusing for a user of the application, if the "benutzer" folder is mentioned as "user". Is there a way to fix it?

  • It might be related to the locale Qt uses at that point. Maybe installing one of the predefined translations helps?

  • I tried setting the locale using QLocale::setDefault(), and also installing the qt_de.qm translation file. The translation file leads to correctly translated QFileDialogs without using the static functions. But both attempts do not translate the directory names.

Log in to reply