aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_512.py
blob: 386a7f960e46ed91cb4d097e1274057ea2a03dc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
''' Test bug 512: http://bugs.openbossa.org/show_bug.cgi?id=512'''

import unittest
from helper import UsesQApplication
from PySide.QtCore import *
from PySide.QtGui import *

class BugTest(UsesQApplication):
    def testCase(self):
        w = QWidget(None)
        lbl = QLabel("Hello", w);
        g = QGridLayout()
        g.addWidget(lbl, 0, 0)
        w.setLayout(g)
        w.show()

        t = g.getItemPosition(0)
        self.assertEqual(type(t), tuple)
        self.assertEqual(t, (0,0,1,1))

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