aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_525.py
blob: 5e146ebe9393d056b2082f3408c049311ac89b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import unittest
from PySide.QtGui import QApplication
from PySide.QtGui import QMenu

class M2(QMenu):
    def __init__(self,parent=None):
        super(M2,self).__init__(parent)
        self.setTitle(self.tr("M2"))

class TestMenuDerivedClass(unittest.TestCase):
    def aboutToShowHandler(self):
        pass

    def testConnectSignal(self):
        app = QApplication([])
        m2 = M2()
        # Test if the aboutToShow signal was translated to correct type
        m2.aboutToShow.connect(self.aboutToShowHandler)

if __name__ == '__main__':
    unittest.main()