[Interest] Showing C++ QAbstractListModel containing QQuickItem (WaylandSurfaceItem) in QML ListView

Tim Bienias tim.bienias at googlemail.com
Fri Nov 2 14:44:18 CET 2012


Hi,

I'm having a bad time with showing a QQuickItem (in particular a
WaylandSurfaceItem from the QtWayland-module) in QML.
There's a Client-class that holds a pointer to the WaylandSurfaceItem. This
Client-class will contain additional information in future.
There's a ClientModel-class derived by QAbstractListModel that holds
Client* in a QList.
I have approved that the Client* gets pushed into the model, but I think
I've been wrong with the delegate in the QML-ListView.

So the main-question is, how does one simply show a C++ QQuickItem, held in
a C++ model, in QML?

super-hmi.pro <http://cutebin.fi/show.php?id=1190>
main.cpp <http://cutebin.fi/show.php?id=1189>
client.hpp + client.cpp <http://cutebin.fi/show.php?id=1193>
clientmodel.hpp + clientmodel.cpp <http://cutebin.fi/show.php?id=1194>
compositor.hpp + compositor.cpp <http://cutebin.fi/show.php?id=1192>
main.qml <http://cutebin.fi/show.php?id=1195>

cheers,

tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121102/9dfbc90d/attachment.html>


More information about the Interest mailing list