From: Manuel Nickschas Date: Thu, 12 Apr 2018 20:38:02 +0000 (+0200) Subject: uisupport: Forcefully disable horizontal scrollbar in BufferView X-Git-Tag: travis-deploy-test~135 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=dd27cd1f84ecceb5fb287894373d4cb42131a03f uisupport: Forcefully disable horizontal scrollbar in BufferView Qt 5.10.1 severly broke QHeaderView and by extension, QTreeView, resulting in a horizontal scrollbar being shown. In order to avoid making this issue too obvious for people using that version of Qt (including the builds currently generated by our CI), force the scrollbar to be hidden in BufferView. The contents can still be scrolled sideways e.g. with horizontal mouse wheel emulation, but that should not hit many users in practice. Earlier or later versions of Qt seem to not suffer from that issue, but always hiding the scrollbar doesn't hurt either way. --- diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 0b5dfa5e..7d7490f5 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -73,6 +73,8 @@ void BufferView::init() header()->hide(); // nobody seems to use this anyway + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + // breaks with Qt 4.8 if (QString("4.8.0") > qVersion()) // FIXME breaks with Qt versions >= 4.10! setAnimated(true);