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.
This commit is contained in:
KIU Shueng Chuan 2021-01-16 06:48:18 +08:00
parent f21dfd9d95
commit e03d4be767

View File

@ -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()