summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 991d88c6ee0..7e5078bf58c 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1416,6 +1416,18 @@ QBindable<QString> QObject::bindableObjectName()
*/
/*!
+ \fn bool QObject::isQmlObjectType() const
+ Returns whether the object has been created by the QML engine or
+ ownership has been explicitly set via QJSEngine::setObjectOwnership().
+ \since 6.11
+*/
+bool QObject::isQmlObjectType() const
+{
+ Q_D(const QObject);
+ return !d->isDeletingChildren && d->declarativeData;
+}
+
+/*!
This virtual function receives events to an object and should
return true if the event \a e was recognized and processed.