From 95470a59e558c8a67b64889626063c86ace2eb75 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 16 Jan 2016 01:26:05 +0000 Subject: [PATCH] gui.log: work around a Qt layout bug. --- artiq/gui/log.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/gui/log.py b/artiq/gui/log.py index b07fb1c84..0e0676295 100644 --- a/artiq/gui/log.py +++ b/artiq/gui/log.py @@ -218,6 +218,15 @@ class _LogDock(dockarea.Dock): if self.scroll_at_bottom: self.log.scrollToBottom() + # HACK: + # If we don't do this, after we first add some rows, the "Time" + # column gets undersized and the text in it gets wrapped. + # We can call self.log.resizeColumnsToContents(), which fixes + # that problem, but now the message column is too large and + # a horizontal scrollbar appears. + # This is almost certainly a Qt layout bug. + self.log.horizontalHeader().reset() + # HACK: # Qt intermittently likes to scroll back to the top when rows are removed. # Work around this by restoring the scrollbar to the previously memorized