本文整理汇总了Python中PySide.QtTest.QTest.qWaitForWindowShown方法的典型用法代码示例。如果您正苦于以下问题:Python QTest.qWaitForWindowShown方法的具体用法?Python QTest.qWaitForWindowShown怎么用?Python QTest.qWaitForWindowShown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtTest.QTest
的用法示例。
在下文中一共展示了QTest.qWaitForWindowShown方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWaitForWindowShown [as 别名]
def setUp(self):
self.app = QtGui.QApplication.instance()
if not self.app:
self.app = QtGui.QApplication([])
settings_mock = SettingsMock()
setup_settings(settings_mock)
self.mw = main_window.MainWindow()
self.mw.show()
QTest.qWaitForWindowShown(self.mw)
示例2: setUp
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWaitForWindowShown [as 别名]
def setUp(self):
self.window = MainWindow()
self.window.show()
QTest.qWaitForWindowShown(self.window)
self.tree_view = self.window.findChild(QTreeView, "tree_view")
self.list_view = self.window.findChild(QListView, "list_view")
SearchDialog.exec_ = MagicMock(return_value=SearchDialog.Accepted)
SearchDialog.result_value = MagicMock(
return_value=ExampleDataFactory.new_pytvdb_show("HIMYM"))
Show.update = MagicMock()
示例3: setUp
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWaitForWindowShown [as 别名]
def setUp(self):
self.search = Search(string="how i", expected_row=2, expected_count=6)
self.dialog = SearchDialog()
self.dialog.show()
QTest.qWaitForWindowShown(self.dialog)
self.assertEqual(self.dialog.ui.search_text_field.text(), "",
"Default Search Text is not empty")
self.assertEqual(self.dialog.model.rowCount(), 0,
"Result model not cleared")
示例4: qWaitForWindowExposed
# 需要导入模块: from PySide.QtTest import QTest [as 别名]
# 或者: from PySide.QtTest.QTest import qWaitForWindowShown [as 别名]
def qWaitForWindowExposed(window, timeout=None):
"""Mimic QTest.qWaitForWindowExposed for Qt4."""
QTest.qWaitForWindowShown(window)
return True