Beispiel #1
0
 def focusInEvent(self, event):
     ClearableEdit.focusInEvent(self, event)
     self.widget.text = str(self.text())
     # A timer is used here because a mouse event following the focusInEvent messes up the
     # selection (so the refresh *has* to happen after the mouse event).
     QTimer.singleShot(0, self._refresh)
Beispiel #2
0
 def focusInEvent(self, event):
     ClearableEdit.focusInEvent(self, event)
     self.widget.text = str(self.text())
     # A timer is used here because a mouse event following the focusInEvent messes up the
     # selection (so the refresh *has* to happen after the mouse event).
     QTimer.singleShot(0, self._refresh)