void AccountWidget::newAccount() { NewAccountDialog *dialog = new NewAccountDialog( this) ; dialog->exec(); int res = dialog->result(); delete dialog; if( res == QDialog::Accepted ) reload(); }
void ClientWidget::newClientAccount() { int row = clientTable->currentRow(); if( row < 0 ) return; quint32 id = clientTable->getCurrentId(); if( id < 0 ) return; NewAccountDialog *dialog = new NewAccountDialog( this, id, 1 ); dialog->setOwnerName( clientTable->text( row, 1) ); dialog->exec(); int res = dialog->result(); delete dialog; if( res == QDialog::Accepted ) accountRequest(row); }