summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_307.py
blob: 1a4446b83602ddfe054710dbdc281812c2cf69a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import unittest
import colorsys

from PySide.QtCore import SIGNAL
from PySide.QtGui import QPushButton, QApplication


class Test (QApplication) :
    def __init__(self, argv) :
        super(Test, self).__init__(argv)
        self._called = False
        
    def called(self):
        self._called = True        


class QApplicationSignalsTest(unittest.TestCase):
    def testQuit(self):
        app = Test([])
        button = QPushButton("BUTTON")
        app.connect(button, SIGNAL("clicked()"), app.called)
        button.click()
        self.assert_(app._called)
        
if __name__ == '__main__':
    unittest.main()