def __init__(self, parent = None): MListWidget.__init__(self, parent=parent) pw = self.proxy_widget = ProxyLineEdit(parent=self) pw.lower() pw.setAttribute(Qt.WA_MacShowFocusRect, False) self.setFocusPolicy(Qt.NoFocus)
def focusInEvent(self, event): '''Shift the focus to the proxy line edit. ''' MListWidget.focusInEvent(self, event) self.proxy_widget.setFocus() event.accept()