Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

No folder translation with non native file dialogs



  • Hello,

    I've created a class inheriting of QtFileDialog, named MyDialog. I use it to show custom widgets in the file dialogs of my app, for example when asking the user to choose a file to open.

    When I'm not using setOption(QFileDialog::DontUseNativeDialog); in the MyDialog constructor, I can't see my custom widgets as the file dialog shown is the Microsoft Windows native one, but Windows default folders names are correctly translated in my local language (French), ie "Desktop" is "Bureau", "Downloads" is "Téléchargements".

    However, when I'm using setOption(QFileDialog::DontUseNativeDialog); to show my custom file dialog, Windows default folders names are not translated, ie "Desktop" is shown as "Desktop".

    In both cases the labels are correctly translated, ie "Open" is "Ouvrir", ...

    I'd like to show my custom file dialog with its widgets, AND to have the correct windows folders names translations. How to achieve that ?

    I'm on Windows and using Qt 5.11.

    Thanks !


  • Lifetime Qt Champion

    Hi
    I think you are hitting this
    https://stackoverflow.com/questions/8906944/qfiledialog-localization
    so try to load the french translations provided by Qt.


Log in to reply