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(
|
sizePolicy.setHeightForWidth(
|
||||||
self.AuthorsSelectionComboItem.sizePolicy().hasHeightForWidth())
|
self.AuthorsSelectionComboItem.sizePolicy().hasHeightForWidth())
|
||||||
self.AuthorsSelectionComboItem.setSizePolicy(sizePolicy)
|
self.AuthorsSelectionComboItem.setSizePolicy(sizePolicy)
|
||||||
self.AuthorsSelectionComboItem.setEditable(False)
|
self.AuthorsSelectionComboItem.setEditable(True)
|
||||||
self.AuthorsSelectionComboItem.setInsertPolicy(
|
self.AuthorsSelectionComboItem.setInsertPolicy(
|
||||||
QtGui.QComboBox.InsertAlphabetically)
|
QtGui.QComboBox.InsertAlphabetically)
|
||||||
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(
|
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(
|
||||||
|
@ -122,6 +122,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def loadAuthors(self):
|
def loadAuthors(self):
|
||||||
authors = self.songmanager.get_authors()
|
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()
|
self.AuthorsSelectionComboItem.clear()
|
||||||
for author in authors:
|
for author in authors:
|
||||||
row = self.AuthorsSelectionComboItem.count()
|
row = self.AuthorsSelectionComboItem.count()
|
||||||
|
Loading…
Reference in New Issue
Block a user