本文整理汇总了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)