diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 49161c1..ef00df1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -166,6 +166,8 @@ void MainWindow::disconnectFromServerRequested() { ui->button_connect->setEnabled(false); + delete ui->tableView_database_table->model(); + emit disconnectFromServer(); } @@ -197,6 +199,8 @@ void MainWindow::showTableRequested() { ui->button_show_table->setEnabled(false); + delete ui->tableView_database_table->model(); // remove old model + QString table_name = ui->comboBox_table_name->currentText(); emit selectTable(table_name); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 8b57b3a..c353b38 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -522,7 +522,29 @@ - + + + + 0 + 0 + + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + true + + + false + +