More stupid PyQt enums

This commit is contained in:
Kovid Goyal 2020-12-20 11:33:36 +05:30
parent 5e40d11834
commit b53d0d5dab
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class SearchBox2(QComboBox): # {{{
self.timer = QTimer() self.timer = QTimer()
self.timer.setSingleShot(True) self.timer.setSingleShot(True)
self.timer.timeout.connect(self.timer_event, type=Qt.ConnectionType.QueuedConnection) self.timer.timeout.connect(self.timer_event, type=Qt.ConnectionType.QueuedConnection)
self.setInsertPolicy(self.NoInsert) self.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
self.setMaxCount(self.MAX_COUNT) self.setMaxCount(self.MAX_COUNT)
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon) self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon)
self.setMinimumContentsLength(25) self.setMinimumContentsLength(25)
@ -342,7 +342,7 @@ class SavedSearchBox(QComboBox): # {{{
self.setCompleter(completer) self.setCompleter(completer)
self.setEditable(True) self.setEditable(True)
self.setInsertPolicy(self.NoInsert) self.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon) self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon)
self.setMinimumContentsLength(10) self.setMinimumContentsLength(10)
self.tool_tip_text = self.toolTip() self.tool_tip_text = self.toolTip()

View File

@ -672,7 +672,7 @@ class HistoryLineEdit(QComboBox): # {{{
def __init__(self, *args): def __init__(self, *args):
QComboBox.__init__(self, *args) QComboBox.__init__(self, *args)
self.setEditable(True) self.setEditable(True)
self.setInsertPolicy(self.NoInsert) self.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
self.setMaxCount(10) self.setMaxCount(10)
self.setClearButtonEnabled = self.lineEdit().setClearButtonEnabled self.setClearButtonEnabled = self.lineEdit().setClearButtonEnabled
self.textChanged = self.editTextChanged self.textChanged = self.editTextChanged