Estensioni C++: Esempio di Image Provider

Come caricare immagini in QML con QQuickImageProvider.

Questo esempio illustra come utilizzare QQuickImageProvider per fornire immagini agli elementi QML Image e come integrarlo in un file QQmlEngineExtensionPlugin, che viene rilevato e caricato in fase di esecuzione. Il plugin diventa così un componente riutilizzabile che può essere installato in una posizione a livello di sistema per essere utilizzato da più applicazioni.

Due blocchi di colore contrassegnati come giallo e rosso generati dal fornitore dell'immagine

Progetto di esempio su code.qt.io

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