Fix bug#512 - "QGridLayout::getItemPosition() is not available"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
parent
6b720050ef
commit
e3796fa3e7
3 changed files with 46 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ PYSIDE_TEST(bug_433.py)
|
|||
PYSIDE_TEST(bug_467.py)
|
||||
PYSIDE_TEST(bug_480.py)
|
||||
PYSIDE_TEST(bug_500.py)
|
||||
PYSIDE_TEST(bug_512.py)
|
||||
PYSIDE_TEST(customproxywidget_test.py)
|
||||
PYSIDE_TEST(deepcopy_test.py)
|
||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||
|
|
|
|||
22
tests/QtGui/bug_512.py
Normal file
22
tests/QtGui/bug_512.py
Normal file
|
|
@ -0,0 +1,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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue