aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/qproperty_decorator.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/QtCore/qproperty_decorator.py')
-rw-r--r--sources/pyside2/tests/QtCore/qproperty_decorator.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/sources/pyside2/tests/QtCore/qproperty_decorator.py b/sources/pyside2/tests/QtCore/qproperty_decorator.py
index c6f0d3c37..c845ac6d3 100644
--- a/sources/pyside2/tests/QtCore/qproperty_decorator.py
+++ b/sources/pyside2/tests/QtCore/qproperty_decorator.py
@@ -26,8 +26,14 @@
##
#############################################################################
-import weakref
+import os
+import sys
import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
from PySide2.QtCore import QObject, Property
@@ -41,7 +47,9 @@ class MyObject(QObject):
return self._value
@value.setter
- def valueSet(self, value):
+ # Note: The name of property and setter must be the same, because the
+ # object changes its identity all the time. `valueSet` no longer works.
+ def value(self, value):
self._value = value