Is QString::toLatin1() what you are looking for??

QString text="text";
int ret = QMessageBox::warning(this, tr("My Application"), text.toLatin1(), QMessageBox::Ok);

J.