eric6/E5Gui/E5ListView.py

changeset 7252
c5e3705073eb
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7251:bc5b1b00560a 7252:c5e3705073eb
20 """ 20 """
21 Protected method implementing special key handling. 21 Protected method implementing special key handling.
22 22
23 @param evt reference to the event (QKeyEvent) 23 @param evt reference to the event (QKeyEvent)
24 """ 24 """
25 if evt.key() in [Qt.Key_Delete, Qt.Key_Backspace] and \ 25 if (
26 self.model() is not None: 26 evt.key() in [Qt.Key_Delete, Qt.Key_Backspace] and
27 self.model() is not None
28 ):
27 self.removeSelected() 29 self.removeSelected()
28 evt.setAccepted(True) 30 evt.setAccepted(True)
29 else: 31 else:
30 super(E5ListView, self).keyPressEvent(evt) 32 super(E5ListView, self).keyPressEvent(evt)
31 33

eric ide

mercurial