From 85715f3fc3de87bfa4ac07f4d76f1b69bb012109 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 23 Dec 2010 16:59:33 -0200 Subject: Fix bug#549 - "QGraphicsWidget::getContentsMargins() and QGraphicsWidget::getWindowFrameMargins() not available" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Renato Araújo Marcelo Lira --- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_549.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/QtGui/bug_549.py (limited to 'tests') diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 7cde60fec..fe62e8e1b 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -21,6 +21,7 @@ PYSIDE_TEST(bug_480.py) PYSIDE_TEST(bug_500.py) PYSIDE_TEST(bug_512.py) PYSIDE_TEST(bug_525.py) +PYSIDE_TEST(bug_549.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(float_to_int_implicit_conversion_test.py) diff --git a/tests/QtGui/bug_549.py b/tests/QtGui/bug_549.py new file mode 100644 index 000000000..6d0789938 --- /dev/null +++ b/tests/QtGui/bug_549.py @@ -0,0 +1,16 @@ +import unittest + +from PySide.QtGui import * + +class TestBug549(unittest.TestCase): + def testBug(self): + app = QApplication([]) + w = QGraphicsWidget() + w.setContentsMargins(1, 2, 3, 4) + self.assertEquals(w.getContentsMargins(), (1, 2, 3, 4)) + w.setWindowFrameMargins(5, 6, 7, 8) + self.assertEquals(w.getWindowFrameMargins(), (5, 6, 7, 8)) + +if __name__ == '__main__': + unittest.main() + -- cgit v1.2.3