Core: Options: Fix category list width

If the vertical scrollbar is invisible, it reports a width of 100
pixels. Use the width of the size hint, instead.

Task-number: QTCREATORBUG-20353
Change-Id: I3d50041788f12360a98a8f41923c6a38e23a63e3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2018-04-30 14:19:53 +02:00
parent 366b813c5c
commit 436967ebf0

View File

@@ -316,7 +316,7 @@ public:
QSize sizeHint() const final QSize sizeHint() const final
{ {
int width = sizeHintForColumn(0) + frameWidth() * 2 + 5; int width = sizeHintForColumn(0) + frameWidth() * 2 + 5;
width += verticalScrollBar()->width(); width += verticalScrollBar()->sizeHint().width();
return QSize(width, 100); return QSize(width, 100);
} }