diff options
authorMitch Curtis <>2021-04-27 14:20:35 +0200
committerQt Cherry-pick Bot <>2021-04-27 15:06:17 +0000
commit26225f19cce7bfcec6b0946a2436e7ad2a38e78c (patch)
parentb3e6f678252ab31b29367ab19458c42cfa2d96e4 (diff)
Document QQmlComponent::createWithInitialProperties() error handling
Unlike create(), it can produce errors that should be checked. Change-Id: I78f2e58c8666eb45f6e850c43e3e97a448b2758e Reviewed-by: Fabian Kosmale <> (cherry picked from commit 4f0622f7f553cd841874f0efe65d7f13edeec216) Reviewed-by: Qt Cherry-pick Bot <>
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 524350253f..0e84885f25 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -839,6 +839,14 @@ QObject *QQmlComponent::create(QQmlContext *context)
properties with \a initialProperties. \a context specifies the context
where the object instance is to be created.
+ \omit
+ TODO: also mention errorString() when QTBUG-93239 is fixed
+ \endomit
+ If any of the \c initialProperties cannot be set, \l isError() will return
+ \c true, and the \l errors() function can be used to
+ get detailed information about the error(s).
\sa QQmlComponent::create
\since 5.14