Writing Custom Qtquickcomponents QtCon
Writing Custom Qtquickcomponents QtCon
Qt Quick Components
Using OpenGL
Kevin Funk, Software Engineer at KDAB
Integrating QtQuick with Qt
Integrating QML with C++ (page 4)
Creating New QML Elements (page 5)
p.2
Integrating QtQuick with Qt
Integrating QtQuick with Qt
Integrating QML with C++
Demo qml-cpp-integration/ex_simple_timer
Demo qml-cpp-integration/ex-canvas-item
Demo qml-cpp-integration/ex-simple-item
Demo qml-cpp-integration/ex-simple-item-scenegraph
Demo qml-cpp-integration/ex-animated-item-scenegraph
Inherit QQuickFramebufferObject::Renderer.
Reimplement createFramebufferObject() to control the FBO format.
Reimplement render() to call your OpenGL code.
Ensure that your OpenGL code is compatible with the QOpenGLContext
used by QQuickWindow (see setFormat(QSurfaceFormat)).
Inherit QQuickFramebufferObject.
Reimplement createRenderer() to return your own renderer.
Qt Demo qml-cpp-integration/textureinsgnode
C++: QQuickPaintedItem
Using QQuickPaintedItem uses an indirect 2D surface to render its
content
So the rendering is a two-step operation. First rasterize the surface,
then draw the surface.
Does not implement edge antialiasing, only QPainter-based antialiasing
C++: QQuickFrameBufferObject
Useful for over-/underlaying complete OpenGL scenes
Tricky to make sure custom OpenGL code does not interfere with
QtQuick renderer
www.kdab.com
kevin.funk@kdab.com