このページでは

QQmlSA::Element Class

class QQmlSA::Element

QML 型を表します。詳細...

ヘッダー: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
ステータス: テクノロジープレビュー

このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。

パブリック関数

Element()
Element(const QQmlSA::Element &other)
Element(QQmlSA::Element &&other)
~Element()
QQmlSA::AccessSemantics accessSemantics() const
QQmlSA::Element baseType() const
QString baseTypeName() const
QString defaultPropertyName() const
QString filePath() const
bool hasMethod(const QString &methodName) const
bool hasOwnProperty(const QString &propertyName) const
bool hasOwnPropertyBindings(const QString &propertyName) const
bool hasProperty(const QString &propertyName) const
bool hasPropertyBindings(const QString &name) const
QQmlSA::SourceLocation idSourceLocation() const
bool inherits(const QQmlSA::Element &element) const
bool isComposite() const
bool isFileRootComponent() const
bool isNull() const
bool isPropertyRequired(const QString &propertyName) const
QString name() const
QQmlSA::Method::Methods ownMethods() const
QQmlSA::Binding::Bindings ownPropertyBindings() const
QQmlSA::Binding::Bindings ownPropertyBindings(const QString &propertyName) const
QQmlSA::Element parentScope() const
QQmlSA::Property property(const QString &propertyName) const
QList<QQmlSA::Binding> propertyBindings(const QString &propertyName) const
QQmlSA::ScopeType scopeType() const
QQmlSA::SourceLocation sourceLocation() const
operator bool() const
bool operator!() const
QQmlSA::Element &operator=(QQmlSA::Element &&other)
QQmlSA::Element &operator=(const QQmlSA::Element &other)
size_t qHash(const QQmlSA::Element &key, size_t seed = 0)
bool operator!=(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)
bool operator==(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)

詳細な説明

メンバー関数のドキュメント

Element::Element()

新しい Element オブジェクトを作成します。

Element::Element(const QQmlSA::Element &other)

other のコピーを作成します。

[noexcept] Element::Element(QQmlSA::Element &&other)

Elementのインスタンスをムーブコンストラクトで生成します。

[noexcept] Element::~Element()

その要素を削除します。

QQmlSA::AccessSemantics Element::accessSemantics() const

この要素のアクセスセマンティクスを返します。たとえば、Reference、Value、Sequenceなどです。

QQmlSA::Element Element::baseType() const

この要素が派生している要素を返します。

QString Element::baseTypeName() const

この要素が派生している要素の名前を返します。

QString Element::defaultPropertyName() const

この要素のデフォルトプロパティの名前を返します。デフォルトプロパティがない場合は、空の文字列を返します。

QString Element::filePath() const

この要素を定義しているQMLコードのファイルパスを返します。

bool Element::hasMethod(const QString &methodName) const

この要素に、methodName という名前のメソッドがあるかどうかを返します。

bool Element::hasOwnProperty(const QString &propertyName) const

この要素が、その基底オブジェクトや拡張オブジェクトでは定義されていない「propertyName 」という名前のプロパティを定義しているかどうかを返します。

bool Element::hasOwnPropertyBindings(const QString &propertyName) const

この要素に、その基底オブジェクトまたは拡張オブジェクトでは定義されておらず、かつ名前が「propertyName 」であるプロパティのバインディングがあるかどうかを返します。

bool Element::hasProperty(const QString &propertyName) const

この要素に「propertyName 」という名前のプロパティがあるかどうかを返します。

bool Element::hasPropertyBindings(const QString &name) const

この要素に、name という名前のプロパティバインディングがあるかどうかを返します。

QQmlSA::SourceLocation Element::idSourceLocation() const

この要素に ID が割り当てられている場合、QML コード内のその ID が割り当てられている箇所を返します。

bool Element::inherits(const QQmlSA::Element &element) const

この要素がelement を継承しているかどうかを返します。

bool Element::isComposite() const

Qmlから定義されたオブジェクトに対してはtrue を返し、C++から宣言されたオブジェクトに対してはfalse を返します。

bool Element::isFileRootComponent() const

この要素がそのQMLファイルのルートコンポーネントであるかどうかを返します。

bool Element::isNull() const

この要素がnullの場合はtrue を返し、それ以外の場合はfalse を返します。

bool Element::isPropertyRequired(const QString &propertyName) const

この要素上で解決された「propertyName 」という名前のプロパティが必須であるかどうかを返します。プロパティが見つからなかった場合は false を返します。

QString Element::name() const

この要素の名前を返します。

QQmlSA::Method::Methods Element::ownMethods() const

この要素の、基底オブジェクトや拡張オブジェクトでは定義されていないメソッドを返します。

QQmlSA::Binding::Bindings Element::ownPropertyBindings() const

この要素の、その基底オブジェクトや拡張オブジェクトでは定義されていないプロパティのバインディングを返します。

QQmlSA::Binding::Bindings Element::ownPropertyBindings(const QString &propertyName) const

この要素の、その基底オブジェクトや拡張オブジェクトでは定義されておらず、かつ名前が `propertyName` であるプロパティのバインディングを返します。

QQmlSA::Element Element::parentScope() const

この要素を囲んでいる要素を返します。

QQmlSA::Property Element::property(const QString &propertyName) const

この要素、またはその基底オブジェクトおよび拡張オブジェクト内に「propertyName 」という名前のプロパティが見つかった場合は、そのプロパティを返します。見つからない場合は、無効なプロパティを返します。

QList<QQmlSA::Binding> Element::propertyBindings(const QString &propertyName) const

この要素の、propertyName という名前のプロパティバインディングを返します。

QQmlSA::ScopeType Element::scopeType() const

Elementのスコープの型を返します。

QQmlSA::SourceLocation Element::sourceLocation() const

この要素が定義されているQMLコード内の位置を返します。

[explicit] Element::operator bool() const

この要素がnullでない場合はtrue を返し、それ以外の場合はfalse を返します。

bool Element::operator!() const

この要素がnullの場合はtrue を返し、それ以外の場合はfalse を返します。

[noexcept] QQmlSA::Element &Element::operator=(QQmlSA::Element &&other)

other をこの Element インスタンスに割り当てます。

QQmlSA::Element &Element::operator=(const QQmlSA::Element &other)

この要素インスタンスにother を割り当てます。

関連する非メンバー

[noexcept] size_t qHash(const QQmlSA::Element &key, size_t seed = 0)

`key` のハッシュ値を返し、計算のシード値として `seed ` を使用します。

bool operator!=(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)

lhs とrhs が等しくない場合は `true ` を返し、それ以外の場合は `false ` を返します。

bool operator==(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)

lhs とrhs が等しい場合は `true ` を返し、それ以外の場合は `false ` を返します。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.