From 516aaa95ca3fc7de34247515ca260dc16fd30f74 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sun, 25 Jul 2021 12:03:16 +0800 Subject: [PATCH] LocationList: make header sections resizable --- src/widgets/locationlist.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/locationlist.cpp b/src/widgets/locationlist.cpp index 4b255d20..f7ad04cc 100644 --- a/src/widgets/locationlist.cpp +++ b/src/widgets/locationlist.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "treewidget.h" #include "widgetsfactory.h" @@ -53,6 +54,7 @@ void LocationList::setupUI() // When updated, pay attention to the Columns enum. m_tree->setHeaderLabels(QStringList() << tr("Path") << tr("Line") << tr("Text")); TreeWidget::showHorizontalScrollbar(m_tree); + m_tree->header()->setSectionResizeMode(QHeaderView::Interactive); connect(m_tree, &QTreeWidget::itemActivated, this, [this](QTreeWidgetItem *p_item, int p_col) { Q_UNUSED(p_col);