Your sample runs perfectly, and I rewrite my function to this
	
	- void NuevoDestinatario::EliminarTelefono_clicked(){ 
- 	qDeleteAll(Telefonos()->selectedItems());		 
- 	//QMessageBox::information(this, "", QString::number(Telefonos()->selectedItems().count())); 
- 	//if(Telefonos()->currentRow()!=-1){ 
- 		//if(QMessageBox::question(this,"","Desea eliminar el elemento seleccionado", 
- 			//QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes){ 
- 				//delete Telefonos()->takeItem(Telefonos()->currentRow()); 
- 		//} 
- 	//} 
- 	//else QMessageBox::information(this,"","No hay elementos seleccionados"); 
- } 
        void NuevoDestinatario::EliminarTelefono_clicked(){
	qDeleteAll(Telefonos()->selectedItems());		
	//QMessageBox::information(this, "", QString::number(Telefonos()->selectedItems().count()));
	//if(Telefonos()->currentRow()!=-1){
		//if(QMessageBox::question(this,"","Desea eliminar el elemento seleccionado",
			//QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes){
				//delete Telefonos()->takeItem(Telefonos()->currentRow());
		//}
	//}
	//else QMessageBox::information(this,"","No hay elementos seleccionados");
}
To copy to clipboard, switch view to plain text mode 
  
and same behaviour, when I click the button the selected item is deselected and nothing is deleted
				
			
Bookmarks