1
0

Fixed table view Tab switch;

Fixed removing unused data model
This commit is contained in:
Andrzej Wójtowicz 2017-09-03 19:04:05 +02:00
parent 7f285add6d
commit 810a6a5aa7
2 changed files with 27 additions and 1 deletions

View File

@ -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);

View File

@ -522,7 +522,29 @@
</widget>
</item>
<item row="1" column="0" colspan="4">
<widget class="QTableView" name="tableView_database_table"/>
<widget class="QTableView" name="tableView_database_table">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>