PDA

View Full Version : QMessageBox custom buttons icons



asik
2nd December 2010, 12:57
Hello,
I want to make Qmessage box using my strings instead of english ones eg
msgBox.addButton("Zapisz", QMessageBox.AcceptRole)

However when i do so the icon present in standard button QMessageBox.Save is not present in my button.
How can I force the standard button icons to be present in my custom buttons but doing the same role as QMessageBox.Save?

Thank You for Your ansewers

franz
2nd December 2010, 14:31
How about using the internationalization features provided by Qt? Your message box should then automagically get a correctly translated button text.

asik
2nd December 2010, 16:37
Does it give the chance to put any text I like becouse internationalization is not excactly what i mean i just want to change the text not only to my language but also the word sometimes ie If I would like to replace the
'cancel' with 'cancel operation' ?
What internationalization features do you have in mind can I ask for the link?