forked from openlp/openlp
Added autocompletion to the Authors combobox.
This commit is contained in:
parent
5708528ba0
commit
7e747f7cc9
@ -135,7 +135,7 @@ class Ui_EditSongDialog(object):
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.AuthorsSelectionComboItem.sizePolicy().hasHeightForWidth())
|
||||
self.AuthorsSelectionComboItem.setSizePolicy(sizePolicy)
|
||||
self.AuthorsSelectionComboItem.setEditable(False)
|
||||
self.AuthorsSelectionComboItem.setEditable(True)
|
||||
self.AuthorsSelectionComboItem.setInsertPolicy(
|
||||
QtGui.QComboBox.InsertAlphabetically)
|
||||
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(
|
||||
|
@ -122,6 +122,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
|
||||
def loadAuthors(self):
|
||||
authors = self.songmanager.get_authors()
|
||||
authorsCompleter = QtGui.QCompleter(
|
||||
[author.display_name for author in authors],
|
||||
self.AuthorsSelectionComboItem)
|
||||
authorsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
|
||||
self.AuthorsSelectionComboItem.setCompleter(authorsCompleter);
|
||||
self.AuthorsSelectionComboItem.clear()
|
||||
for author in authors:
|
||||
row = self.AuthorsSelectionComboItem.count()
|
||||
|
Loading…
Reference in New Issue
Block a user