本文整理匯總了Python中PyQt4.QtGui.QDialog.Rejected方法的典型用法代碼示例。如果您正苦於以下問題:Python QDialog.Rejected方法的具體用法?Python QDialog.Rejected怎麽用?Python QDialog.Rejected使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt4.QtGui.QDialog
的用法示例。
在下文中一共展示了QDialog.Rejected方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_dialog_cancel
# 需要導入模塊: from PyQt4.QtGui import QDialog [as 別名]
# 或者: from PyQt4.QtGui.QDialog import Rejected [as 別名]
def test_dialog_cancel(self):
"""Test we can click cancel."""
button = self.dialog.button_box.button(QDialogButtonBox.Cancel)
button.click()
result = self.dialog.result()
self.assertEqual(result, QDialog.Rejected)
示例2: test_dialog_help
# 需要導入模塊: from PyQt4.QtGui import QDialog [as 別名]
# 或者: from PyQt4.QtGui.QDialog import Rejected [as 別名]
def test_dialog_help(self):
"""Test we can click Help."""
button = self.dialog.button_box.button(QDialogButtonBox.Help)
button.click()
result = self.dialog.result()
# For now Rejected as we don't have any action for the help button
self.assertEqual(result, QDialog.Rejected)
示例3: test_dialog_close
# 需要導入模塊: from PyQt4.QtGui import QDialog [as 別名]
# 或者: from PyQt4.QtGui.QDialog import Rejected [as 別名]
def test_dialog_close(self):
"""Test we can click Close."""
button = self.dialog.button_box.button(QDialogButtonBox.Close)
button.click()
result = self.dialog.result()
self.assertEqual(result, QDialog.Rejected)