diff --git a/pyqtgraph/Qt.py b/pyqtgraph/Qt.py index 40240879..ebd81394 100644 --- a/pyqtgraph/Qt.py +++ b/pyqtgraph/Qt.py @@ -213,7 +213,6 @@ elif QT_LIB == PYQT5: QtSvg = FailedImport(err) try: from PyQt5 import QtTest - QtTest.QTest.qWaitForWindowShown = QtTest.QTest.qWaitForWindowExposed except ImportError as err: QtTest = FailedImport(err) @@ -232,7 +231,6 @@ elif QT_LIB == PYQT6: QtOpenGLWidgets = FailedImport(err) try: from PyQt6 import QtTest - QtTest.QTest.qWaitForWindowShown = QtTest.QTest.qWaitForWindowExposed except ImportError as err: QtTest = FailedImport(err) @@ -247,7 +245,6 @@ elif QT_LIB == PYSIDE2: QtSvg = FailedImport(err) try: from PySide2 import QtTest - QtTest.QTest.qWaitForWindowShown = QtTest.QTest.qWaitForWindowExposed except ImportError as err: QtTest = FailedImport(err) @@ -273,7 +270,6 @@ elif QT_LIB == PYSIDE6: QtOpenGLWidgets = FailedImport(err) try: from PySide6 import QtTest - QtTest.QTest.qWaitForWindowShown = QtTest.QTest.qWaitForWindowExposed except ImportError as err: QtTest = FailedImport(err) diff --git a/pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py b/pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py index d41c6b61..3fa4438e 100644 --- a/pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py +++ b/pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py @@ -27,7 +27,7 @@ def init_viewbox(): vb.setRange(xRange=[0, 10], yRange=[0, 10], padding=0) # required to make mapFromView work properly. - qtest.qWaitForWindowShown(win) + qtest.qWaitForWindowExposed(win) g = pg.GridItem() vb.addItem(g) diff --git a/pyqtgraph/graphicsItems/tests/test_ImageItem.py b/pyqtgraph/graphicsItems/tests/test_ImageItem.py index 7179981b..40b1c6b6 100644 --- a/pyqtgraph/graphicsItems/tests/test_ImageItem.py +++ b/pyqtgraph/graphicsItems/tests/test_ImageItem.py @@ -28,7 +28,7 @@ def test_ImageItem(transpose=False): data[3, :10] = dmax + 13 img.setImage(data) - QtTest.QTest.qWaitForWindowShown(w) + QtTest.QTest.qWaitForWindowExposed(w) time.sleep(0.1) app.processEvents() assertImageApproved(w, 'imageitem/init', 'Init image item. View is auto-scaled, image axis 0 marked by 1 line, axis 1 is marked by 2 lines. Origin in bottom-left.') diff --git a/pyqtgraph/graphicsItems/tests/test_InfiniteLine.py b/pyqtgraph/graphicsItems/tests/test_InfiniteLine.py index 689e1963..be3cb460 100644 --- a/pyqtgraph/graphicsItems/tests/test_InfiniteLine.py +++ b/pyqtgraph/graphicsItems/tests/test_InfiniteLine.py @@ -16,7 +16,7 @@ def test_InfiniteLine(): plt.resize(600, 600) # seemingly arbitrary requirements; might need longer wait time for some platforms.. - QtTest.QTest.qWaitForWindowShown(plt) + QtTest.QTest.qWaitForWindowExposed(plt) QtTest.QTest.qWait(100) vline = plt.addLine(x=1) diff --git a/pyqtgraph/graphicsItems/tests/test_NonUniformImage.py b/pyqtgraph/graphicsItems/tests/test_NonUniformImage.py index fbedef15..d9b600fd 100644 --- a/pyqtgraph/graphicsItems/tests/test_NonUniformImage.py +++ b/pyqtgraph/graphicsItems/tests/test_NonUniformImage.py @@ -70,7 +70,7 @@ def test_NonUniformImage_lut(): h = image.getHistogram() lut.plot.setData(*h) - QtTest.QTest.qWaitForWindowShown(window) + QtTest.QTest.qWaitForWindowExposed(window) QtTest.QTest.qWait(100) assertImageApproved(window, 'nonuniform_image/lut-3x3') @@ -98,7 +98,7 @@ def test_NonUniformImage_colormap(): viewbox.addItem(image) - QtTest.QTest.qWaitForWindowShown(window) + QtTest.QTest.qWaitForWindowExposed(window) QtTest.QTest.qWait(100) assertImageApproved(window, 'nonuniform_image/colormap-3x3') diff --git a/pyqtgraph/graphicsItems/tests/test_ROI.py b/pyqtgraph/graphicsItems/tests/test_ROI.py index d4618842..7005adfa 100644 --- a/pyqtgraph/graphicsItems/tests/test_ROI.py +++ b/pyqtgraph/graphicsItems/tests/test_ROI.py @@ -174,7 +174,7 @@ def test_PolyLineROI(): plt.scene().minDragTime = 0 # let us simulate mouse drags very quickly. # seemingly arbitrary requirements; might need longer wait time for some platforms.. - QtTest.QTest.qWaitForWindowShown(plt) + QtTest.QTest.qWaitForWindowExposed(plt) QtTest.QTest.qWait(100) for r, name in rois: diff --git a/pyqtgraph/tests/ui_testing.py b/pyqtgraph/tests/ui_testing.py index 747aadf9..05e74f61 100644 --- a/pyqtgraph/tests/ui_testing.py +++ b/pyqtgraph/tests/ui_testing.py @@ -10,8 +10,8 @@ def resizeWindow(win, w, h, timeout=2.0): """ QtGui.QApplication.processEvents() # Sometimes the window size will switch multiple times before settling - # on its final size. Adding qWaitForWindowShown seems to help with this. - QtTest.QTest.qWaitForWindowShown(win) + # on its final size. Adding qWaitForWindowExposed seems to help with this. + QtTest.QTest.qWaitForWindowExposed(win) win.resize(w, h) start = time.time() while True: