このページでは

Qt3DCore::QComponent Class

class Qt3DCore::QComponent

Qt3DCore::QEntity インスタンスによってコンポーネントとして集約できるシーンノードの基底クラスです。詳細...

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

プロパティ

パブリック関数

QComponent(Qt3DCore::QNode *parent = nullptr)
QList<Qt3DCore::QEntity *> entities() const
bool isShareable() const

パブリックスロット

void setShareable(bool isShareable)

シグナル

void addedToEntity(Qt3DCore::QEntity *entity)
void removedFromEntity(Qt3DCore::QEntity *entity)
void shareableChanged(bool isShareable)

詳細な説明

Qt3DCore::QComponent は、Qt3DCore::QEntity のインスタンスに割り当てたり、場合によってはインスタンス間で共有したりできる、動作の垂直スライスを提供します。

Qt3DCore::QComponent サブクラスは、多くの場合、集約エンティティに有用な挙動を与えるグループに集約されます。たとえば、Qt3D レンダラーアスペクトによって描画されるエンティティを実現するには、そのエンティティは、Qt3DCore::QTransform 、Qt3DRender::QMesh 、およびQt3DRender::QMaterial コンポーネントを集約することがほとんどでしょう。

Qt3DCore::QEntityも参照してください 。

プロパティのドキュメント

isShareable : bool

QComponent の共有可能フラグを保持します。QComponent は、true の場合、複数のエンティティ間で共有できます。

アクセス関数:

bool isShareable() const
void setShareable(bool isShareable)

Notifierシグナル:

void shareableChanged(bool isShareable)

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

[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)

parent を親として、新しいQComponentインスタンスを生成します。

注: QComponentを 直接インスタンス化してはなりません。代わりに、そのサブクラスのいずれかをインスタンス化してください。

[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)

entity に参照が追加されたことを示します。

QList<Qt3DCore::QEntity *> QComponent::entities() const

このコンポーネントを参照しているすべてのエンティティを含むQList を返します。

[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)

entity から参照が削除されたことを示します。

© 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.