aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-09-03 21:43:59 +0200
committerRoland Knall <rknall@gmail.com>2019-09-03 20:09:58 +0000
commitc2a7214845ba72fee39fe82f143edcccb6e54156 (patch)
treef452b33e6a09e1c41e5d4bc95f72c7a9bfed95c5
parent993733dda8e535d5bcdad5baae284b6caad78fd5 (diff)
Qt: Make first column moveable
Due to changes in Qt 5.11, the first section is no longer moveable by default. This is due to internal storage mechanism. For strictly flat tables it is not an issue to make the first column moveable again. (see https://codereview.qt-project.org/c/qt/qtbase/+/207947) Bug: 15879 Change-Id: If4f1371404cd252ec9f65a27c25b1c68781a0c33 Reviewed-on: https://code.wireshark.org/review/34445 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
-rw-r--r--ui/qt/packet_list.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 942e03a97e..3304fe362c 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -241,6 +241,10 @@ PacketList::PacketList(QWidget *parent) :
connect(packet_list_header_, &PacketListHeader::columnsChanged, this, &PacketList::columnsChanged);
setHeader(packet_list_header_);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
+ header()->setFirstSectionMovable(true);
+#endif
+
// Shrink down to a small but nonzero size in the main splitter.
int one_em = fontMetrics().height();
setMinimumSize(one_em, one_em);