Skip to content

GraphicsView: Add basic tests ...#1396

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
dgoeries:graphics-view-basic-test
Oct 13, 2020
Merged

GraphicsView: Add basic tests ...#1396
j9ac9k merged 1 commit intopyqtgraph:masterfrom
dgoeries:graphics-view-basic-test

Conversation

@dgoeries
Copy link
Copy Markdown
Contributor

No description provided.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 13, 2020

Thanks for expanding our test coverage @dgoeries we appreciate it!

@j9ac9k j9ac9k merged commit 287d564 into pyqtgraph:master Oct 13, 2020
@pijyoi
Copy link
Copy Markdown
Contributor

pijyoi commented Feb 9, 2021

I have a query regarding the "app.deleteLater()" line in:
https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/widgets/tests/test_graphics_view.py#L91

Am I understanding correctly from:
https://doc.qt.io/qt-5/qobject.html#deleteLater
that deleteLater should not be called on the QApplication instance since it is within the event loop itself that the deferred delete object would get destroyed?

For instance, on Windows 10 / Python 3.7.9, the following snippet crashes for {PySide2 5.15, PyQt5 5.15} and hangs for {PySide6 6.0, PyQt6 6.0}

import pyqtgraph as pg
app = pg.mkQApp()
pg.Qt.QtCore.QTimer.singleShot(500, pg.Qt.QtWidgets.QApplication.quit)
app.deleteLater()
app.exec_()
print('DONE')

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Feb 9, 2021

oof we probably don't want that one there, or the del line above.

@dgoeries
Copy link
Copy Markdown
Contributor Author

dgoeries commented Feb 9, 2021

It does not fit in the pyqtgraph testing and can be removed. I realized too late

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants