Qt3DCore::QComponent Class
class Qt3DCore::QComponentLa classe base dei nodi di scena che possono essere aggregati dalle istanze di “ Qt3DCore::QEntity ” come componenti. Per saperne di più...
| Intestazione: | #include <QComponent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| In QML: | Component3D |
| Eredita da: | Qt3DCore::QNode |
| Ereditato da: | 24 tipiQt3DAnimation::QAbstractClipAnimator, Qt3DCore::QArmature, Qt3DCore::QBoundingVolume, Qt3DCore::QCoreSettings, Qt3DCore::QTransform, Qt3DInput::QAxisAccumulator, Qt3DInput::QInputSettings, Qt3DInput::QKeyboardHandler, Qt3DInput::QLogicalDevice, Qt3DInput::QMouseHandler, Qt3DLogic::QFrameAction, Qt3DRender::QAbstractLight, Qt3DRender::QAbstractRayCaster, Qt3DRender::QCameraLens, Qt3DRender::QComputeCommand, Qt3DRender::QEnvironmentLight, Qt3DRender::QLayer, Qt3DRender::QLevelOfDetail, Qt3DRender::QMaterial, Qt3DRender::QObjectPicker, Qt3DRender::QRenderSettings, Qt3DRender::QRenderTarget, Qt3DRender::QSceneLoader e Qt3DRender::QShaderData |
| Stato: | Obsoleta |
Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.
Proprietà
- isShareable : bool
Funzioni pubbliche
| QComponent(Qt3DCore::QNode *parent = nullptr) | |
| QList<Qt3DCore::QEntity *> | entities() const |
| bool | isShareable() const |
Slot pubblici
| void | setShareable(bool isShareable) |
Segnali
| void | addedToEntity(Qt3DCore::QEntity *entity) |
| void | removedFromEntity(Qt3DCore::QEntity *entity) |
| void | shareableChanged(bool isShareable) |
Descrizione dettagliata
Un'Qt3DCore::QComponent e fornisce una sezione verticale di comportamento che può essere assegnata a, e talvolta condivisa tra, istanze di un Qt3DCore::QEntity e.
Qt3DCore::QComponent Le sottoclassi sono spesso aggregate in gruppi che conferiscono un comportamento utile all'entità aggregante. Ad esempio, per avere un'entità che venga disegnata dall'aspetto del renderer Qt3D, un'entità aggregherebbe molto probabilmente i componenti Qt3DCore::QTransform, Qt3DRender::QMesh e Qt3DRender::QMaterial.
Vedi anche Qt3DCore::QEntity.
Documentazione delle proprietà
isShareable : bool
Contiene il flag di condivisibilità dell'QComponent. L'QComponent può essere condiviso tra diverse entità se true.
Funzioni di accesso:
| bool | isShareable() const |
| void | setShareable(bool isShareable) |
Segnale di notifica:
| void | shareableChanged(bool isShareable) |
Documentazione delle funzioni membro
[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)
Crea una nuova istanza di QComponent con parent come genitore.
Nota: un QComponent non dovrebbe mai essere istanziato direttamente; istanziare invece una delle sue sottoclassi.
[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)
Indica che è stato aggiunto un riferimento a entity.
QList<Qt3DCore::QEntity *> QComponent::entities() const
Restituisce un oggetto ` QList ` contenente tutte le entità che fanno riferimento a questo componente.
[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)
Indica che un riferimento è stato rimosso da 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.