From fde80eeaa5f4ee4150f9292c5783eb790b0fcb96 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 16 Mar 2019 12:09:58 +0100 Subject: [PATCH] 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 --- desktop-widgets/tab-widgets/TabDiveSite.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)