Bugfix: Qt: After the first entry was added, the header names would be reset to 1, 2, 3
All checks were successful
the build was successful
All checks were successful
the build was successful
This commit is contained in:
parent
57e37f90c5
commit
a444c3b966
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.6)
|
||||
project (whyblocked
|
||||
VERSION 0.7.6
|
||||
VERSION 0.7.7
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -33,6 +33,14 @@ MainWindow::MainWindow(QMainWindow *parent) : QMainWindow(parent)
|
|||
void MainWindow::populate_tableview()
|
||||
{
|
||||
_model->clear();
|
||||
_model->setHorizontalHeaderLabels(
|
||||
{
|
||||
tr("User/Instance"),
|
||||
tr("Blocked/Silenced"),
|
||||
tr("Reason")
|
||||
});
|
||||
tableview->horizontalHeader()->resizeSection(0, 250);
|
||||
|
||||
result_view result;
|
||||
if (view(result))
|
||||
{
|
||||
|
@ -44,11 +52,6 @@ void MainWindow::populate_tableview()
|
|||
}
|
||||
}
|
||||
|
||||
_model->setHeaderData(0, Qt::Horizontal, tr("User/Instance"));
|
||||
_model->setHeaderData(1, Qt::Horizontal, tr("Blocked/Silenced?"));
|
||||
_model->setHeaderData(2, Qt::Horizontal, tr("Reason"));
|
||||
tableview->horizontalHeader()->resizeSection(0, 250);
|
||||
|
||||
statusBar()->showMessage(tr("Database loaded."));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user