With the Qt 5 alpha release already out and the first production release coming in a few months, I'm wondering what is required to port existing Qt 4.x QDeclarativeItem-based visual classes to Qt 5. I know QQuickPaintedItem is included to facilitate this porting effort by providing the QPainter API similar to what QDeclarativeItem does today, but I'm wondering how custom visual C++-based QML components are developed in Qt 5. The documentation for QQuickItem does not list a virtual paint method as QDeclarativeItem does. If someone could describe what the overall process is for developing C++-based visual QML components in Qt 5 (and, even better, provide a trivial code example) I'd greatly appreciate it.So far I haven't found any information or examples on this topic and am very curious as to how custom painting will be accomplished in Qt 5/Qt Quick 2.
Edit: I forgot to mention that I've seen the QQuickCanvas QML element that allows for an HTML5-like API for painting in QML. However, I'm interested in how painting is done in C++.
Bookmarks