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

Tim Bienias tim.bienias at googlemail.com
Sat Nov 3 01:01:00 CET 2012


So anyone who's interested in that: I've changed the delegate line 22 to
"children: surface" and it works now - told ya I was going wrong with the
delegate.
Solved.

2012/11/2 Tim Bienias <tim.bienias at googlemail.com>

> 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/20121103/3e6f1401/attachment.html>


More information about the Interest mailing list