From e03d4be7673a3b38ee25eeafb2c16e34154426fb Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 16 Jan 2021 06:48:18 +0800 Subject: [PATCH] fix: QComboBox::AdjustToMinimumContentsLength is no longer available documentation for Qt 4.8 and Qt 5.12 have advised to "Use AdjustToContents or AdjustToContentsOnFirstShow instead" documentation in Qt 5.15 no longer shows AdjustToMinimumContentsLength. --- pyqtgraph/widgets/ComboBox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/ComboBox.py b/pyqtgraph/widgets/ComboBox.py index 6f184c5f..632216ee 100644 --- a/pyqtgraph/widgets/ComboBox.py +++ b/pyqtgraph/widgets/ComboBox.py @@ -24,7 +24,7 @@ class ComboBox(QtGui.QComboBox): #self.value = default if 'darwin' in sys.platform: ## because MacOSX can show names that are wider than the comboBox - self.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) + self.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) #self.setMinimumContentsLength(10) self._chosenText = None self._items = OrderedDict()