PDA

View Full Version : System native QDialog and its translation



SeeLook
28th October 2012, 18:38
Hi
I would like to have QFileDialor and QColorDialor translated.
I saw a few posts here and around but none were suficient for me.
to call:

QFileDialog::getOpenFileName(this, tr("some title"),
QDir::homePath(),"*.filter",
0, QFileDialog::DontUseNativeDialog);
It is solution only in a half.

For native dialogs problem appears when KDE is installed and shows its own implementation of f.e. QColorDialog, unfortinately without localisation other than english.
In the same moment native KDE app can show propper translation.
Maybe it is possible to grab somehow the KDEish *.mo/*.po translations and load it by QTranslator::Load()
or some other way to have native dialog.
I think, reimplementing dialogs seems to be worst than QFileDialog::DontUseNativeDialog

With respects
Seelook