summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-11-09 22:36:11 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-11-09 22:36:11 -0300
commit66ff08586178ffb601fe874d48b9847fb577f513 (patch)
tree1d22a50e13cfaec0c5ca71bae0047b0b744d00ea /tests
parentc7f6b49e1e8df003f44528839f4b0438f155e8b1 (diff)
downloadpyside-66ff08586178ffb601fe874d48b9847fb577f513.tar.gz
pyside-66ff08586178ffb601fe874d48b9847fb577f513.tar.xz
pyside-66ff08586178ffb601fe874d48b9847fb577f513.zip
Fixed QVariant conversions for user type.
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/qobject_property_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/QtCore/qobject_property_test.py b/tests/QtCore/qobject_property_test.py
index 776a14d..adb1679 100644
--- a/tests/QtCore/qobject_property_test.py
+++ b/tests/QtCore/qobject_property_test.py
@@ -129,6 +129,14 @@ class PropertyCase(unittest.TestCase):
self.assertTrue(obj.property('foo') is mysize)
+ def testValueType(self):
+ rect = QRect(1, 2, 3, 4)
+ obj = QObject()
+ obj.setProperty('rect', rect)
+ '''Value types when converted to QVariant is copyed'''
+ self.assertFalse(obj.property('rect') is rect)
+ self.assertEqual(obj.property('rect'), rect)
+
class PropertyWithConstructorCase(unittest.TestCase):
'''Test case for QObject properties set using named arguments in the constructor.'''