Hi,

I had this:
Qt Code:
  1. int r = QMessageBox::question(this, tr("Delete CD"), tr("delete \"%1\" and all its tracks?")
  2. .arg(record.value(cd_idartista).toString()),
  3. QMessageBox::Yes|QMessageBox::Default, QMessageBox::No|QMessageBox::Escape);
  4.  
  5. if(r == QMessageBox::No)
  6. ...
To copy to clipboard, switch view to plain text mode 

The problem is that i get a "Yes" and "No" text in the Buttons, when i wanted "Sim" and "Não".
Then i tried this:
Qt Code:
  1. int result = QMessageBox::question(this,
  2. trUtf8("Delete CD"),
  3. trUtf8("Eliminar \"%1\" e todas as pistas?").arg(record.value(cd_titulo).toString()),
  4. trUtf8("&Sim"),
  5. trUtf8("&Não"),
  6. QString::null,
  7. 1,
  8. 1 );
To copy to clipboard, switch view to plain text mode 
... but it looks as this is considered to be obsolete(http://doc.trolltech.com/4.6/qmessagebox-obsolete.html).

Now i have:
Qt Code:
  1. QMessageBox msgBox;
  2. msgBox.setText(trUtf8("Delete CD"));
  3. msgBox.setInformativeText(record.value(cd_titulo).toString());
  4. msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
  5. msgBox.setDefaultButton(QMessageBox::No);
  6.  
  7. if(msgBox.exec() == QMessageBox::No)
  8. ...
To copy to clipboard, switch view to plain text mode 

Now ... how do i change the Yes/No text by Sim/Não ?

Thanks