Disable add/edit/delete buttons now possible.
This commit is contained in:
+7
-2
@@ -71,6 +71,11 @@ QWidget *IGridForm::filterWidget()
|
||||
return ui->filterWidget;
|
||||
}
|
||||
|
||||
void IGridForm::enableButtons()
|
||||
{
|
||||
ui->btnNew->setEnabled(canAddRecord());
|
||||
}
|
||||
|
||||
|
||||
void IGridForm::on_btnNew_clicked()
|
||||
{
|
||||
@@ -143,8 +148,8 @@ void IGridForm::on_tableView_clicked(const QModelIndex &)
|
||||
{
|
||||
if (ui->tableView->currentIndex().isValid())
|
||||
{
|
||||
ui->btnEdit->setEnabled(true);
|
||||
ui->btnDelete->setEnabled(true);
|
||||
ui->btnEdit->setEnabled(canEditRecord());
|
||||
ui->btnDelete->setEnabled(canDeleteRecord());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user