aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qwidget_test.py
blob: 70271a093b8988cd532ae74b749a2e566db23f1e (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

from PySide.QtGui import QWidget, QMainWindow
from helper import UsesQApplication

class QWidgetInherit(QMainWindow):
    def __init__(self):
        QWidget.__init__(self)

class QWidgetTest(UsesQApplication):

    def testInheritance(self):
        self.assertRaises(TypeError, QWidgetInherit)

class QWidgetVisible(UsesQApplication):

    def testBasic(self):
        # Also related to bug #244, on existence of setVisible'''
        widget = QWidget()
        self.assert_(not widget.isVisible())
        widget.setVisible(True)
        self.assert_(widget.isVisible())


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