diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-16 12:09:58 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | fde80eeaa5f4ee4150f9292c5783eb790b0fcb96 (patch) | |
tree | b3373994ac3bc0b7ec2cbc5181742b1e3658cfbf /desktop-widgets/tab-widgets/TabDiveSite.cpp | |
parent | d0435672ac8b8afaac6847c67af0fb6b47a000f7 (diff) | |
download | subsurface-fde80eeaa5f4ee4150f9292c5783eb790b0fcb96.tar.gz |
Dive sites: stretch name and description columns
Stretch the name and description columns in the dive site table,
so that they don't start too small. This should only be a temporary
solution, as it disables the save column width to preferences
feature of TableView.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveSite.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveSite.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.cpp b/desktop-widgets/tab-widgets/TabDiveSite.cpp index b8d7aa1c5..f021f73dc 100644 --- a/desktop-widgets/tab-widgets/TabDiveSite.cpp +++ b/desktop-widgets/tab-widgets/TabDiveSite.cpp @@ -15,6 +15,8 @@ TabDiveSite::TabDiveSite(QWidget *parent) : TabBase(parent) // Default: sort by name ui.diveSites->view()->sortByColumn(LocationInformationModel::NAME, Qt::AscendingOrder); ui.diveSites->view()->setSortingEnabled(true); + ui.diveSites->view()->horizontalHeader()->setSectionResizeMode(LocationInformationModel::NAME, QHeaderView::Stretch); + ui.diveSites->view()->horizontalHeader()->setSectionResizeMode(LocationInformationModel::DESCRIPTION, QHeaderView::Stretch); // Show only the first few columns for (int i = LocationInformationModel::LOCATION; i < LocationInformationModel::COLUMNS; ++i) |