Esempio "Hello GL2"

L'esempio "Hello GL2" illustra l'uso di base delle classi relative a Qt OpenGL fornite con Qt.

Screenshot di una finestra che mostra un oggetto 3D

Qt fornisce la classe ` QOpenGLWidget ` per consentire il rendering della grafica OpenGL all'interno di un'interfaccia utente standard dell'applicazione. Creando una sottoclasse di questa classe e fornendo reimplementazioni delle funzioni di gestione degli eventi, è possibile visualizzare scene 3D su widget che possono essere inseriti nei layout, collegati ad altri oggetti tramite segnali e slot e manipolati come qualsiasi altro widget.

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.