aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_363.py
blob: 5ba5deee759b5e7e22713f80b314ddf92eea4637 (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
''' Test bug 363: http://bugs.openbossa.org/show_bug.cgi?id=363'''

import sys
import unittest
from helper import UsesQApplication
from PySide import QtCore,QtGui

# Check for desktop object lifetime
class BugTest(UsesQApplication):
    def mySlot(self):
        pass

    # test if it is possible to connect with a desktop object after storing that on an auxiliar variable
    def testCase1(self):
        desktop = QtGui.QApplication.desktop()
        desktop.resized[int].connect(self.mySlot)
        self.assert_(True)

    # test if it is possible to connect with a desktop object without storing that on an auxiliar variable
    def testCase2(self):
        QtGui.QApplication.desktop().resized[int].connect(self.mySlot)
        self.assert_(True)

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