Beispiel #1
0
 def showEvent(self, e):
     #QTimer.singleShot(0, lambda: windows.goto(hwnd(self)))
     self.inp.setFocus()
     if not self.completer.popuped:
         QTimer.singleShot(0, lambda: self._try_query(self.inp.text()))
     self.super.showEvent(e)
Beispiel #2
0
 def _try_popup(self, content):
     # don't show popup if search box is hidden
     if self.isVisible():
         QTimer.singleShot(0, lambda: self.popup(content))
Beispiel #3
0
 def show_window(self):
     self.show()
     QTimer.singleShot(42, lambda: self.client.goto(hwnd(self)))
Beispiel #4
0
 def _try_query(self, text):
     """Avoid line editor frozen when key continues pressed."""
     QTimer.singleShot(0, lambda: self.query(text))
Beispiel #5
0
 def _continues_update(self):
     if self.popuped:
         self._update_popup()
         QTimer.singleShot(1000, self._continues_update)