本文整理匯總了Python中calibre.gui2.widgets.EnComboBox類的典型用法代碼示例。如果您正苦於以下問題:Python EnComboBox類的具體用法?Python EnComboBox怎麽用?Python EnComboBox使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了EnComboBox類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self, *args, **kwargs):
EnComboBox.__init__(self, *args)
self.setLineEdit(LineEdit(self, completer_widget=self, sort_func=kwargs.get('sort_func', sort_key)))
self.lineEdit().item_selected.connect(self.item_selected)
self.setCompleter(None)
self.eat_focus_out = True
self.installEventFilter(self)
示例2: eventFilter
def eventFilter(self, obj, e):
try:
c = self.lineEdit().mcompleter
except AttributeError:
return False
etype = e.type()
if self.eat_focus_out and self is obj and etype == e.FocusOut:
if c.isVisible():
return True
return EnComboBox.eventFilter(self, obj, e)
示例3: clear
def clear(self):
self.lineEdit().clear()
EnComboBox.clear(self)
示例4: __init__
def __init__(self, *args):
EnComboBox.__init__(self, *args)
self.setLineEdit(LineEdit(self, completer_widget=self))
self.setCompleter(None)
self.eat_focus_out = True
self.installEventFilter(self)
示例5: __init__
def __init__(self, *args):
EnComboBox.__init__(self, *args)
self.le = MultiCompleteLineEdit(self, completer_widget=self)
self.setLineEdit(self.le)
示例6: __init__
def __init__(self, *args, **kwargs):
EnComboBox.__init__(self, *args)
self.setLineEdit(LineEdit(self, completer_widget=self, sort_func=kwargs.get("sort_func", sort_key)))
self.setCompleter(None)
self.eat_focus_out = True
self.installEventFilter(self)