msg.button(QMessageBox::Ok)->setText(tr("My Ok label"));

here it shows tr identifier not found.
so here how can i use QObject.