completion resizeHint: adjust for scrollbar

This commit is contained in:
Florian Bruhin 2014-02-05 18:05:08 +01:00
parent 444b813cf5
commit 748a28be1c

View File

@ -98,6 +98,9 @@ class CompletionView(QTreeView):
"""
super().resizeEvent(e)
width = e.size().width()
bar = self.verticalScrollBar()
if not bar.isVisible():
width -= bar.sizeHint().width()
cols = self.model.columnCount()
colwidth = int(width / cols)
logging.debug('width {}, {} columns -> colwidth {}'.format(width, cols,