示例#1
0
文件: lit.py 项目: kazarin1alex/lit
 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)
示例#2
0
文件: lit.py 项目: kazarin1alex/lit
 def _try_popup(self, content):
     # don't show popup if search box is hidden
     if self.isVisible():
         QTimer.singleShot(0, lambda: self.popup(content))
示例#3
0
文件: lit.py 项目: kazarin1alex/lit
 def show_window(self):
     self.show()
     QTimer.singleShot(42, lambda: self.client.goto(hwnd(self)))
示例#4
0
文件: lit.py 项目: kazarin1alex/lit
 def _try_query(self, text):
     """Avoid line editor frozen when key continues pressed."""
     QTimer.singleShot(0, lambda: self.query(text))
示例#5
0
 def _continues_update(self):
     if self.popuped:
         self._update_popup()
         QTimer.singleShot(1000, self._continues_update)