QFileDialog's Translation
Hi
I want to translate QFileDialog into German. i used
QString str = "qt_de" ;//+ QLocale::system().name();
QTranslator qtTranslator;
bool bloadapp = qtTranslator.load(str ,TranslatorPath);
app.installTranslator(&qtTranslator);
qt_de is the default .qm file provided by Qt.
But problem is that all Qt's messages, button, menubar translated but QFileDialog's button like New Folder, Save, Open is not translated.
Somebody told that use flag QFileDialog:ontUseNativeDialog
So I Used like this
QString str = QFileDialog::getExistingDirectory(this,"Open","/Volumes/",QFileDialog::QFileDialog:ontUseNativeDialog) ;
Yeah Its translated,,but sometimes its crashes happens while Browse.
Is there any other way instead of QFileDialog:ontUseNativeDialog.
Re: QFileDialog's Translation
Contents of the native dialog are out of reach for Qt. You need to find out what is required by the native dialog provider (like MacOS, KDE, Gnome, etc.) to translate the entries in the dialog.
Re: QFileDialog's Translation
Hi
Is there other way to translate QFileDialog without using QFileDialog:DontUseNativeDialog
for below:
QString str = QFileDialog::getExistingDirectory(this,"Open","/Volumes/",QFileDialog:DontUseNativeDialog) ;
QString str = "qt_de" ;//+ QLocale::system().name();
QTranslator qtTranslator;
bool bloadapp = qtTranslator.load(str ,TranslatorPath);
app.installTranslator(&qtTranslator);
qt_de is the default .qm file provided by Qt.
Kindly reply this.
Re: QFileDialog's Translation
Which part of my previous reply you didn't understand?
Re: QFileDialog's Translation
Quote:
Originally Posted by
wysota
Which part of my previous reply you didn't understand?
ontents of the native dialog are out of reach for Qt. You need to find out what is required by the native dialog provider (like MacOS, KDE, Gnome, etc.) to translate the entries in the dialog.
Hi
As u told, contents of the native dialog are out of reach for Qt. I have not much idea about MacOS's Native Dialog. Kindly tell me some syntax/example code for translate QFileDialog.
Thanks
Santosh
Re: QFileDialog's Translation
I have told you that QFileDialog can't translate the native dialog. You either use the non-native one or have to ask your OS to provide a translated native dialog for you.