summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorJøger Hansegård <joger.hansegard@qt.io>2024-01-26 16:11:05 +0100
committerJøger Hansegård <joger.hansegard@qt.io>2024-01-27 19:14:09 +0100
commit9cf4494d49170eafb9c179d5304c0a70eaf25b96 (patch)
treec442397e04a784eacbf722c6a2d2fafefca9b4e7 /src/multimedia
parent1e3e0fac0d1c3b0772958bb590be263f7114bd45 (diff)
Document that Qt Multimedia requires a QCoreApplication
We have previously had examples that demonstrate use of QtMultimedia APIs without first having created an application object. This is unfortunate because to fix certain types of bugs, we need to restrict the lifetime of internal Qt Multimedia state to the lifetime of the Qt application. This patch addresses this issue by documenting that a Qt application object must be created before any of the Qt Multimedia APIs are accessed, and that if the application object is recreated, multimedia objects must be recreated as well. Pick-to: 6.7 6.6 6.5 Change-Id: I95645c95ac922c6adb0287d4d02ffb4f385fa60d Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/doc/src/multimedia-overview.qdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/multimedia/doc/src/multimedia-overview.qdoc b/src/multimedia/doc/src/multimedia-overview.qdoc
index ba70da087..5b671b7eb 100644
--- a/src/multimedia/doc/src/multimedia-overview.qdoc
+++ b/src/multimedia/doc/src/multimedia-overview.qdoc
@@ -120,6 +120,13 @@ platform. This can mean that support for various codecs, or containers will vary
between machines. This support depends on what the end user has installed.
See \l{Supported Media Formats} for more detail.
+\note Qt Multimedia APIs depend on functionality provided by QCoreApplication,
+and multimedia objects created using the Qt Multimedia APIs can only be used
+during the lifetime of this application object. It is therefore important to
+create a QCoreApplication, QGuiApplication, or QApplication before accessing
+any of the Qt Multimedia APIs. If the application object is recreated, make
+sure that any Qt Multimedia objects are also recreated.
+
\section1 Changes from Previous Versions
If you previously used Qt Multimedia in Qt 5, see