I am trying to internationalize (English/French) QMessageBox::warning - and almost completely succeeded - in the following way:
*
...
QMessageBox::StandardButton reply;
reply = QMessageBox::warning(this, tr("System will be affected"),
QString(tr("%1 %2\n\nDo you wish to proceed?)).arg(m_disFrontVariants.getTitleFor(m_disFrontVariantName)).arg(warningMsg), **QMessageBox::Cancel|QMessageBox::Yes, QMessageBox::Cancel**);
if(reply != QMessageBox::Yes) {
return false;
}
...
*
This results in a half-translation that looks like this:
So while I can very well internationalize the title and the text, I haven't been able to find a way to do so for the StandardButtons. And note that the result of the warning box creation is used as decision value.
Is there a way to achieve a fully translated QMessageBox::warning? Or must I replace it with a custom QMessageBox warning box? If the latter then how can I still use the yellow warning icon?