Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickdesignersupportmetainfo.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
7
8#include <private/qqmlmetatype_p.h>
9
11
13{
14 if (object == nullptr)
15 return false;
16
17 const QMetaObject *metaObject = object->metaObject();
18
19 while (metaObject) {
21 if (qmlType.qmlTypeName() == QLatin1String(superTypeName)) // ignore version numbers
22 return true;
23
24 if (metaObject->className() == superTypeName)
25 return true;
26
27 metaObject = metaObject->superClass();
28 }
29
30 return false;
31}
32
37
38void QQuickDesignerSupportMetaInfo::registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
39{
40 qmlRegisterCustomType<QQuickDesignerCustomParserObject>(uri, versionMajor, versionMinor, qmlName, new QQuickDesignerCustomParser);
41}
42
44
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qobject.h:103
static void registerNotifyPropertyChangeCallBack(void(*callback)(QObject *, const QQuickDesignerSupport::PropertyName &propertyName))
static QQmlType qmlType(const QString &qualifiedName, QTypeRevision version)
Returns the type (if any) of URI-qualified named qualifiedName and version specified by version_major...
QString qmlTypeName() const
Definition qqmltype.cpp:469
static void registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
static void registerNotifyPropertyChangeCallBack(void(*callback)(QObject *, const QQuickDesignerSupport::PropertyName &))
static bool isSubclassOf(QObject *object, const QByteArray &superTypeName)
Combined button and popup list for selecting options.
obj metaObject() -> className()
\inmodule QtCore