本文整理汇总了Python中PySide.QtTest.QTest.qWait方法的典型用法代码示例。如果您正苦于以下问题:Python QTest.qWait方法的具体用法?Python QTest.qWait怎么用?Python QTest.qWait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtTest.QTest
的用法示例。
在下文中一共展示了QTest.qWait方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: qWaitForWindowExposed
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWait [as 别名]
def qWaitForWindowExposed(self, window, timeout=None):
"""Waits until the window is shown in the screen.
See QTest.qWaitForWindowExposed for details.
"""
result = qWaitForWindowExposedAndActivate(window, timeout)
if self.TIMEOUT_WAIT:
QTest.qWait(self.TIMEOUT_WAIT)
return result
示例2: qWait
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWait [as 别名]
def qWait(self, ms=None):
"""Waits for ms milliseconds, events will be processed.
See QTest.qWait for details.
"""
if ms is None:
ms = self.DEFAULT_TIMEOUT_WAIT
if qt.BINDING == 'PySide':
# PySide has no qWait, provide a replacement
timeout = int(ms)
endTimeMS = int(time.time() * 1000) + timeout
while timeout > 0:
self.qapp.processEvents(qt.QEventLoop.AllEvents,
maxtime=timeout)
timeout = endTimeMS - int(time.time() * 1000)
else:
QTest.qWait(ms + self.TIMEOUT_WAIT)