Doc: fix QOpenGLWidget::defaultFramebufferObject documentation

Fix the link to QSurfaceFormat::StereoBuffers, and clean the text up
a bit. If everything is a \note, then we might just as well not have
notes, so move the statement about when this function is useful out
of a note, and combine the statements elaborating on ownership and
lifetime of framebuffer and contexts into a single note.

Pick-to: 6.5 6.5.0
Change-Id: I7cb1f9ff78ba760e99d639550130f5c833ad684a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-03-01 13:36:32 +01:00
parent 3ff66569ea
commit 47df0eb513

View File

@ -1358,15 +1358,13 @@ GLuint QOpenGLWidget::defaultFramebufferObject() const
\return The framebuffer object handle of the specified target buffer or
\c 0 if not yet initialized.
\note Calling this overload only makes sense if \l QSurfaceFormat::StereoBuffer is enabled
and supported by the hardware. Will return the default buffer if it's not.
Calling this overload only makes sense if \l QSurfaceFormat::StereoBuffers is enabled
and supported by the hardware. If not, this method will return the default buffer.
\note The framebuffer object belongs to the context returned by context()
and may not be accessible from other contexts.
\note The context and the framebuffer object used by the widget changes when
reparenting the widget via setParent(). In addition, the framebuffer object
changes on each resize.
and may not be accessible from other contexts. The context and the framebuffer
object used by the widget changes when reparenting the widget via setParent().
In addition, the framebuffer object changes on each resize.
\since 6.5