aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/signals/bug_189.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/signals/bug_189.py')
-rw-r--r--sources/pyside6/tests/signals/bug_189.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/pyside6/tests/signals/bug_189.py b/sources/pyside6/tests/signals/bug_189.py
index f13a9c2cc..ef3c0483b 100644
--- a/sources/pyside6/tests/signals/bug_189.py
+++ b/sources/pyside6/tests/signals/bug_189.py
@@ -35,9 +35,11 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from PySide6 import QtCore, QtWidgets
+from PySide6.QtCore import QTimer
+from PySide6.QtWidgets import QSlider
from helper.usesqapplication import UsesQApplication
+
class TestBugPYSIDE189(UsesQApplication):
def testDisconnect(self):
@@ -46,12 +48,12 @@ class TestBugPYSIDE189(UsesQApplication):
def onValueChanged(self, value):
pass
- sld = QtWidgets.QSlider()
+ sld = QSlider()
sld.valueChanged.connect(onValueChanged)
sld.deleteLater()
- QtCore.QTimer.singleShot(0, self.app.quit)
+ QTimer.singleShot(0, self.app.quit)
self.app.exec_()
self.assertRaises(RuntimeError, sld.valueChanged.disconnect, onValueChanged)