aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/thread_signals_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/thread_signals_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/thread_signals_test.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtCore/thread_signals_test.py b/sources/pyside6/tests/QtCore/thread_signals_test.py
index 80cda6b92..a453d1ac1 100644
--- a/sources/pyside6/tests/QtCore/thread_signals_test.py
+++ b/sources/pyside6/tests/QtCore/thread_signals_test.py
@@ -12,17 +12,19 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from PySide6.QtCore import QObject, SIGNAL, QFile, QThread, QTimer, Qt
-from helper.usesqcoreapplication import UsesQCoreApplication
+from PySide6.QtCore import Signal, QThread
+from helper.usesqapplication import UsesQApplication
class MyThread(QThread):
+ test = Signal(str)
+
def run(self):
- self.emit(SIGNAL("test(const QString&)"), "INdT - PySide")
+ self.test.emit("INdT - PySide")
-class TestThreadSignal(UsesQCoreApplication):
+class TestThreadSignal(UsesQApplication):
__called__ = True
@@ -33,7 +35,7 @@ class TestThreadSignal(UsesQCoreApplication):
def testThread(self):
t = MyThread()
- QObject.connect(t, SIGNAL("test(const QString&)"), self._callback)
+ t.test.connect(self._callback)
t.start()
self.app.exec()