diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-13 10:06:45 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-15 21:47:44 +0200 |
commit | 98e0600c5a317bec17740aa010a36589adc7eab4 (patch) | |
tree | 28c3cdfb14fb6a6c050d85dac70fe020a44025ef | |
parent | 1399b3cccea3a16660e17844051989cc89581bf3 (diff) |
Add Python-specific note to QOpenGLContext::aboutToBeDestroyed() documentation
The signal is not received when emitted from the destructor.
Pick-to: 6.6 6.5
Fixes: PYSIDE-2460
Change-Id: Ic2273c5b9ef1f53bd58615b6982016e646aee326
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 1dab68e579..d8da482ecc 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -452,6 +452,11 @@ void QOpenGLContext::destroy() If you wish to make the context current in order to do clean-up, make sure to only connect to the signal using a direct connection. + + \note In Qt for Python, this signal will not be received when emitted + from the destructor of QOpenGLWidget or QOpenGLWindow due to the Python + instance already being destroyed. We recommend doing cleanups + in QWidget::hideEvent() instead. */ /*! |