How to translate the buttons in qmessagebox?

前端 未结 6 840
轮回少年
轮回少年 2020-12-30 01:43

I have a QMessageBox like this:

QMessageBox::question(this, tr(\"Sure want to quit?\"), 
    tr(\"Sure to quit?\"), QMessageBox::Yes | QMessageB         


        
6条回答
  •  孤城傲影
    2020-12-30 02:27

    There's no reason to do this. These texts are localized in Qt's own localization files. You need to provide, and perhaps also load, Qt's localizations within your application.

提交回复
热议问题