moi je fais plutôt comme ça ui->ButtonOK->setEnabled(
DocIndex::instance()->validateNewCountryName( CurrentName ) // - if the validator says that the entry is valid
|| (CurrentName == this->EditedCountry) // - or if the edited name has not changed
)
;