Ralf Wickum
Ralf Wickum

Reputation: 3270

Translate Qt-Dialogs: ColorDialog or FileDialog

I have a Qt application. There I use QColorDialog to pick a QColor and QFileDialog to read/save files. My specific terms I have translated into a individual myApp_DE.qm file (works fine except for this).

But the Qt specific dialogs, i.e. QColorDialog or QFileDialog

QColor color = QColorDialog::getColor(Qt::white, this, ui->label->text(),  QColorDialog::DontUseNativeDialog);

or

QString exportFileName = QFileDialog::getSaveFileName(this, tr("Export dialog"), QDir::homePath(), tr("To text file (*.txt)"));

is still in the initial language, whereas my myApp_DE.qm was translated properly.

How can I translate these Qt specific dialogs?

I have UbuntuStudio in german QLocale::system() returns "de_DE", but even in the system, some buttons say "Quit" (I guess no translation availble there?).

Upvotes: 1

Views: 1024

Answers (0)

Related Questions