desktop: maximize size of last column in filter-preset table

This was just ugly: the column with the "trash" symbol and the
name had the same size. On creation of the object, make the last
column expand and adapt the size of the "trash" column according
to its content.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-11-07 11:25:42 +01:00 committed by Dirk Hohndel
parent 360123d432
commit 68b63534a3

View file

@ -30,6 +30,8 @@ FilterWidget::FilterWidget(QWidget* parent) :
ui.presetTable->setModel(FilterPresetModel::instance());
ui.presetTable->setSelectionBehavior(QAbstractItemView::SelectRows);
ui.presetTable->setSelectionMode(QAbstractItemView::SingleSelection);
ui.presetTable->horizontalHeader()->setStretchLastSection(true);
ui.presetTable->resizeColumnsToContents();
connect(ui.clear, &QToolButton::clicked, this, &FilterWidget::clearFilter);
connect(ui.close, &QToolButton::clicked, this, &FilterWidget::closeFilter);